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 Object
implements org.openqa.selenium.WebDriver.TargetLocator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.WebElement
org.openqa.selenium.Alert
alert()
org.openqa.selenium.Alert
org.openqa.selenium.WebDriver
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.org.openqa.selenium.WebDriver
Switch to frame by index with a configurable timeout NB! Order of frames can be different in different browsers, see Selenide tests.org.openqa.selenium.WebDriver
Switch to frame by name or idorg.openqa.selenium.WebDriver
Switch to frame by name or id with a configurable timeoutorg.openqa.selenium.WebDriver
frame
(org.openqa.selenium.WebElement frameElement) void
innerFrame
(String firstFrame, String... otherFrames) Switch to the inner frame (last child frame in given sequence).org.openqa.selenium.WebDriver
newWindow
(org.openqa.selenium.WindowType typeHint) org.openqa.selenium.WebDriver
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.org.openqa.selenium.WebDriver
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.WebDriver
Switch to window/tab by name/handle/titleorg.openqa.selenium.WebDriver
Switch to window/tab by name/handle/title with a configurable timeout
-
Constructor Details
-
SelenideTargetLocator
-
-
Method Details
-
frame
@Nonnull 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:
frame
in 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:
frame
in 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
@Nonnull public org.openqa.selenium.WebDriver frame(org.openqa.selenium.WebElement frameElement) - Specified by:
frame
in interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
parentFrame
@Nonnull public org.openqa.selenium.WebDriver parentFrame()- Specified by:
parentFrame
in interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
defaultContent
@Nonnull public org.openqa.selenium.WebDriver defaultContent()- Specified by:
defaultContent
in interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
activeElement
@Nonnull public org.openqa.selenium.WebElement activeElement()- Specified by:
activeElement
in interfaceorg.openqa.selenium.WebDriver.TargetLocator
-
alert
@Nonnull public org.openqa.selenium.Alert alert()- Specified by:
alert
in 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
@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
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:
window
in interfaceorg.openqa.selenium.WebDriver.TargetLocator
- Parameters:
nameOrHandleOrTitle
- name or handle or title of window/tab
-
window
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
public org.openqa.selenium.WebDriver newWindow(org.openqa.selenium.WindowType typeHint) - Specified by:
newWindow
in interfaceorg.openqa.selenium.WebDriver.TargetLocator
-