Class SwitchTo
java.lang.Object
net.serenitybdd.screenplay.playwright.interactions.SwitchTo
Switch between browser pages (tabs) or open new ones.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.serenitybdd.screenplay.PerformablenewPage()Open a new browser page (tab).static net.serenitybdd.screenplay.PerformableOpen a new page and navigate to the given URL.static net.serenitybdd.screenplay.PerformablepageNumber(int index) Switch to the page at the given index (0-based).static net.serenitybdd.screenplay.PerformablepageWithTitle(String title) Switch to the page with the given title (partial match).static net.serenitybdd.screenplay.PerformablepageWithUrl(String url) Switch to the page with the given URL (partial match).static net.serenitybdd.screenplay.PerformableClose the current page and switch to the previous one.
-
Constructor Details
-
SwitchTo
public SwitchTo()
-
-
Method Details
-
newPage
public static net.serenitybdd.screenplay.Performable newPage()Open a new browser page (tab). -
newPageAt
Open a new page and navigate to the given URL. -
pageNumber
public static net.serenitybdd.screenplay.Performable pageNumber(int index) Switch to the page at the given index (0-based). -
pageWithTitle
Switch to the page with the given title (partial match). -
pageWithUrl
Switch to the page with the given URL (partial match). -
previousPageAfterClosingCurrent
public static net.serenitybdd.screenplay.Performable previousPageAfterClosingCurrent()Close the current page and switch to the previous one.
-