Package com.codeborne.selenide
Class SelenideTargetLocator
- java.lang.Object
-
- com.codeborne.selenide.SelenideTargetLocator
-
- All Implemented Interfaces:
org.openqa.selenium.WebDriver.TargetLocator
@ParametersAreNonnullByDefault public class SelenideTargetLocator extends java.lang.Object implements org.openqa.selenium.WebDriver.TargetLocator
-
-
Constructor Summary
Constructors Constructor Description SelenideTargetLocator(Driver driver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openqa.selenium.WebElementactiveElement()org.openqa.selenium.Alertalert()org.openqa.selenium.WebDriverdefaultContent()org.openqa.selenium.WebDriverframe(int index)org.openqa.selenium.WebDriverframe(java.lang.String nameOrId)org.openqa.selenium.WebDriverframe(org.openqa.selenium.WebElement frameElement)org.openqa.selenium.WebDriverinnerFrame(java.lang.String... frames)Switch to the inner frame (last child frame in given sequence)org.openqa.selenium.WebDriverparentFrame()org.openqa.selenium.WebDriverwindow(int index)Switch to window/tab by index NB! Order of windows/tabs can be different in different browsers, see Selenide tests.org.openqa.selenium.WebDriverwindow(int index, java.time.Duration duration)Switch to window/tab by index with a configurable timeout NB! Order of windows/tabs can be different in different browsers, see Selenide tests.org.openqa.selenium.WebDriverwindow(java.lang.String nameOrHandleOrTitle)Switch to window/tab by name/handle/titleorg.openqa.selenium.WebDriverwindow(java.lang.String nameOrHandleOrTitle, java.time.Duration duration)Switch to window/tab by name/handle/title with a configurable timeout
-
-
-
Constructor Detail
-
SelenideTargetLocator
public SelenideTargetLocator(Driver driver)
-
-
Method Detail
-
frame
@Nonnull public org.openqa.selenium.WebDriver frame(int index)
- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
frame
@Nonnull public org.openqa.selenium.WebDriver frame(java.lang.String nameOrId)
- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
frame
@Nonnull public org.openqa.selenium.WebDriver frame(org.openqa.selenium.WebElement frameElement)
- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
parentFrame
@Nonnull public org.openqa.selenium.WebDriver parentFrame()
- Specified by:
parentFramein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
defaultContent
@Nonnull public org.openqa.selenium.WebDriver defaultContent()
- Specified by:
defaultContentin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
activeElement
@Nonnull public org.openqa.selenium.WebElement activeElement()
- Specified by:
activeElementin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
alert
@Nonnull public org.openqa.selenium.Alert alert()
- Specified by:
alertin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
innerFrame
@Nonnull public org.openqa.selenium.WebDriver innerFrame(java.lang.String... frames)
Switch to the inner frame (last child frame in given sequence)
-
window
@CheckReturnValue @Nonnull public org.openqa.selenium.WebDriver window(int index)
Switch to window/tab by index NB! Order of windows/tabs can be different in different browsers, see Selenide tests.- Parameters:
index- index of window (0-based)
-
window
@CheckReturnValue @Nonnull public org.openqa.selenium.WebDriver window(int index, java.time.Duration duration)Switch to window/tab by index with a configurable timeout NB! Order of windows/tabs can be different in different browsers, see Selenide tests.- Parameters:
index- index of window (0-based)duration- the timeout duration. It overrides default Config.timeout()
-
window
@CheckReturnValue @Nonnull public org.openqa.selenium.WebDriver window(java.lang.String nameOrHandleOrTitle)
Switch to window/tab by name/handle/title- Specified by:
windowin interfaceorg.openqa.selenium.WebDriver.TargetLocator- Parameters:
nameOrHandleOrTitle- name or handle or title of window/tab
-
window
@CheckReturnValue @Nonnull public org.openqa.selenium.WebDriver window(java.lang.String nameOrHandleOrTitle, java.time.Duration duration)Switch to window/tab by name/handle/title with a configurable timeout- Parameters:
nameOrHandleOrTitle- name or handle or title of window/tabduration- the timeout duration. It overrides default Config.timeout()
-
-