Then to move from the child window to the parent window, we shall take the help of the switchTo().window method and pass the parent window handle id as an argument to the method. In order to switch its focus from the parent to the child window, we shall take the help of the switchTo().window method and pass the window handle id of the child window as an argument to the method. We have to add import to accommodate Set and import and import statements to accommodate iterator in our code.īy default, the driver object can access the elements of the parent window. To iterate over the window handles, the iterator method is used. The getWindowHandle method is used to store the browser window currently active. The getWindowHandles method is used to store all the opened window handles in the Set data structure. The getWindowHandles and getWindowHandle methods can be used to handle child windows. We can close the child browser window in Selenium webdriver.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |