Class Windows
- java.lang.Object
-
- com.thoughtworks.selenium.webdriven.Windows
-
public class Windows extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Windows(org.openqa.selenium.WebDriver driver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidselectBlankWindow(org.openqa.selenium.WebDriver driver)Selects the only_blankwindow.voidselectFrame(org.openqa.selenium.WebDriver driver, java.lang.String locator)voidselectPopUp(org.openqa.selenium.WebDriver driver, java.lang.String windowID)voidselectWindow(org.openqa.selenium.WebDriver driver, java.lang.String windowID)
-
-
-
Method Detail
-
selectWindow
public void selectWindow(org.openqa.selenium.WebDriver driver, java.lang.String windowID)
-
selectPopUp
public void selectPopUp(org.openqa.selenium.WebDriver driver, java.lang.String windowID)
-
selectFrame
public void selectFrame(org.openqa.selenium.WebDriver driver, java.lang.String locator)
-
selectBlankWindow
public void selectBlankWindow(org.openqa.selenium.WebDriver driver)
Selects the only_blankwindow. A window open withtarget='_blank'will have awindow.name = null.This method assumes that there will only be one single
_blankwindow and selects the first one with no name. Therefore if for any reasons there are multiple windows withwindow.name = nullthe first found one will be selected.If none of the windows have
window.name = nullthe last selected one will be re-selected and aSeleniumExceptionwill be thrown.- Parameters:
driver- WebDriver- Throws:
org.openqa.selenium.NoSuchWindowException- if no window withwindow.name = nullis found.
-
-