Class Switch
- java.lang.Object
-
- net.serenitybdd.screenplay.actions.Switch
-
public class Switch extends Object
Switch to a different frame or window. This wraps the WebDriver.switchTo() methods as Screenplay interactions.
-
-
Constructor Summary
Constructors Constructor Description Switch()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Performable
toActiveElement()
static Performable
toAlert()
static Performable
toDefaultContext()
static Performable
toFrame(Integer frameId)
static Performable
toFrame(String frameName)
static Performable
toFrame(org.openqa.selenium.WebElement webElement)
static Performable
toNewWindow()
static Performable
toParentFrame()
static Performable
toTheOtherWindow()
Switch to the first window that is not the current window.static Performable
toWindow(String nameOrHandle)
static Performable
toWindowTitled(String title)
-
-
-
Method Detail
-
toFrame
public static Performable toFrame(Integer frameId)
-
toFrame
public static Performable toFrame(String frameName)
-
toFrame
public static Performable toFrame(org.openqa.selenium.WebElement webElement)
-
toParentFrame
public static Performable toParentFrame()
-
toWindow
public static Performable toWindow(String nameOrHandle)
-
toNewWindow
public static Performable toNewWindow()
-
toWindowTitled
public static Performable toWindowTitled(String title)
-
toTheOtherWindow
public static Performable toTheOtherWindow()
Switch to the first window that is not the current window.- Returns:
-
toAlert
public static Performable toAlert()
-
toDefaultContext
public static Performable toDefaultContext()
-
toActiveElement
public static Performable toActiveElement()
-
-