Package com.codeborne.selenide
Class SelenideTargetLocator
java.lang.Object
com.codeborne.selenide.SelenideTargetLocator
- All Implemented Interfaces:
org.openqa.selenium.WebDriver.TargetLocator
public class SelenideTargetLocator
extends Object
implements org.openqa.selenium.WebDriver.TargetLocator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.WebElementorg.openqa.selenium.Alertalert()org.openqa.selenium.Alertorg.openqa.selenium.WebDriverorg.openqa.selenium.WebDriverframe(int index) Switch to frame by index NB! Order of frames can be different in different browsers, see Selenide tests.org.openqa.selenium.WebDriverSwitch to frame by index with a configurable timeout NB! Order of frames can be different in different browsers, see Selenide tests.org.openqa.selenium.WebDriverSwitch to frame by name or idorg.openqa.selenium.WebDriverSwitch to frame by name or id with a configurable timeoutorg.openqa.selenium.WebDriverframe(org.openqa.selenium.WebElement frameElement) voidinnerFrame(String firstFrame, String... otherFrames) Switch to the inner frame (last child frame in given sequence).org.openqa.selenium.WebDrivernewWindow(org.openqa.selenium.WindowType typeHint) org.openqa.selenium.WebDriverorg.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.WebDriverSwitch 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.WebDriverSwitch to window/tab by name/handle/titleorg.openqa.selenium.WebDriverSwitch to window/tab by name/handle/title with a configurable timeout
-
Constructor Details
-
SelenideTargetLocator
-
-
Method Details
-
frame
@CanIgnoreReturnValue public org.openqa.selenium.WebDriver frame(int index) Switch to frame by index NB! Order of frames can be different in different browsers, see Selenide tests.- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator- Parameters:
index- index of frame (0-based)
-
frame
Switch to frame by index with a configurable timeout NB! Order of frames can be different in different browsers, see Selenide tests.- Parameters:
index- index of frame (0-based)timeout- the timeout duration. It overrides default Config.timeout()
-
frame
Switch to frame by name or id- Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator- Parameters:
nameOrId- name or id of frame
-
frame
Switch to frame by name or id with a configurable timeout- Parameters:
nameOrId- name or id of frametimeout- the timeout duration. It overrides default Config.timeout()
-
frame
@CanIgnoreReturnValue public org.openqa.selenium.WebDriver frame(org.openqa.selenium.WebElement frameElement) - Specified by:
framein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
parentFrame
@CanIgnoreReturnValue public org.openqa.selenium.WebDriver parentFrame()- Specified by:
parentFramein interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
defaultContent
@CanIgnoreReturnValue public org.openqa.selenium.WebDriver defaultContent()- Specified by:
defaultContentin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
activeElement
@CanIgnoreReturnValue public org.openqa.selenium.WebElement activeElement()- Specified by:
activeElementin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
alert
@CanIgnoreReturnValue public org.openqa.selenium.Alert alert()- Specified by:
alertin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
alert
-
innerFrame
Switch to the inner frame (last child frame in given sequence).This method
- switches to the root frame (aka "default content"),
- switches to "firstFrame",
- switches to every of "otherFrames".
-
window
@CanIgnoreReturnValue 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
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)timeout- the timeout duration. It overrides default Config.timeout()
-
window
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
@CanIgnoreReturnValue public org.openqa.selenium.WebDriver window(String nameOrHandleOrTitle, Duration timeout) Switch to window/tab by name/handle/title with a configurable timeout- Parameters:
nameOrHandleOrTitle- name or handle or title of window/tabtimeout- the timeout duration. It overrides default Config.timeout()
-
newWindow
@CanIgnoreReturnValue public org.openqa.selenium.WebDriver newWindow(org.openqa.selenium.WindowType typeHint) - Specified by:
newWindowin interfaceorg.openqa.selenium.WebDriver.TargetLocator
-