public class EyesTargetLocator extends Object implements org.openqa.selenium.WebDriver.TargetLocator
| Modifier and Type | Class and Description |
|---|---|
protected static class |
EyesTargetLocator.TargetType
An enum for the different types of frames we can switch into.
|
| Constructor and Description |
|---|
EyesTargetLocator(Logger logger,
EyesWebDriver driver,
org.openqa.selenium.WebDriver.TargetLocator targetLocator)
Initialized a new EyesTargetLocator object.
|
| Modifier and Type | Method and Description |
|---|---|
org.openqa.selenium.WebElement |
activeElement() |
org.openqa.selenium.Alert |
alert() |
org.openqa.selenium.WebDriver |
defaultContent() |
org.openqa.selenium.WebDriver |
frame(int index) |
org.openqa.selenium.WebDriver |
frame(String nameOrId) |
org.openqa.selenium.WebDriver |
frame(org.openqa.selenium.WebElement frameElement) |
org.openqa.selenium.WebDriver |
frames(FrameChain frameChain)
Switches into every frame in the frame chain.
|
org.openqa.selenium.WebDriver |
frames(String[] framesPath)
Switches into every frame in the list.
|
org.openqa.selenium.WebDriver |
parentFrame() |
void |
willSwitchToFrame(EyesTargetLocator.TargetType targetType,
org.openqa.selenium.WebElement targetFrame)
Will be called before switching into a frame.
|
void |
willSwitchToWindow(String nameOrHandle)
Will be called before switching into a window.
|
org.openqa.selenium.WebDriver |
window(String nameOrHandle) |
public EyesTargetLocator(Logger logger, EyesWebDriver driver, org.openqa.selenium.WebDriver.TargetLocator targetLocator)
driver - The WebDriver from which the targetLocator was received.targetLocator - The actual TargetLocator object.public void willSwitchToFrame(EyesTargetLocator.TargetType targetType, org.openqa.selenium.WebElement targetFrame)
targetType - The type of frame we're about to switch into.targetFrame - The element about to be switched to, if available. Otherwise, null.public void willSwitchToWindow(String nameOrHandle)
nameOrHandle - The name/handle of the window to be switched to.public org.openqa.selenium.WebDriver frame(int index)
frame in interface org.openqa.selenium.WebDriver.TargetLocatorpublic org.openqa.selenium.WebDriver frame(String nameOrId)
frame in interface org.openqa.selenium.WebDriver.TargetLocatorpublic org.openqa.selenium.WebDriver frame(org.openqa.selenium.WebElement frameElement)
frame in interface org.openqa.selenium.WebDriver.TargetLocatorpublic org.openqa.selenium.WebDriver parentFrame()
parentFrame in interface org.openqa.selenium.WebDriver.TargetLocatorpublic org.openqa.selenium.WebDriver frames(FrameChain frameChain)
frameChain - The path to the frame to switch to.public org.openqa.selenium.WebDriver frames(String[] framesPath)
framesPath - The path to the frame to check. This is a list of
frame names/IDs (where each frame is nested in the
previous frame).public org.openqa.selenium.WebDriver window(String nameOrHandle)
window in interface org.openqa.selenium.WebDriver.TargetLocatorpublic org.openqa.selenium.WebDriver defaultContent()
defaultContent in interface org.openqa.selenium.WebDriver.TargetLocatorpublic org.openqa.selenium.WebElement activeElement()
activeElement in interface org.openqa.selenium.WebDriver.TargetLocatorpublic org.openqa.selenium.Alert alert()
alert in interface org.openqa.selenium.WebDriver.TargetLocatorCopyright © 2017. All rights reserved.