protected class RemoteWebDriver.RemoteTargetLocator extends java.lang.Object implements WebDriver.TargetLocator
Modifier | Constructor and Description |
---|---|
protected |
RemoteTargetLocator() |
Modifier and Type | Method and Description |
---|---|
WebElement |
activeElement()
Switches to the element that currently has focus within the document currently "switched to",
or the body element if this cannot be detected.
|
Alert |
alert()
Switches to the currently active modal dialog for this particular driver instance.
|
WebDriver |
defaultContent()
Selects either the first frame on the page, or the main document when a page contains
iframes.
|
WebDriver |
frame(int frameIndex)
Select a frame by its (zero-based) index.
|
WebDriver |
frame(java.lang.String frameName)
Select a frame by its name or ID.
|
WebDriver |
frame(WebElement frameElement)
Select a frame using its previously located
WebElement . |
WebDriver |
parentFrame()
Change focus to the parent context.
|
WebDriver |
window(java.lang.String windowHandleOrName)
Switch the focus of future commands for this driver to the window with the given name/handle.
|
public WebDriver frame(int frameIndex)
WebDriver.TargetLocator
frame
in interface WebDriver.TargetLocator
frameIndex
- (zero-based) indexpublic WebDriver frame(java.lang.String frameName)
WebDriver.TargetLocator
frame
in interface WebDriver.TargetLocator
frameName
- the name of the frame window, the id of the <frame> or <iframe>
element, or the (zero-based) indexpublic WebDriver frame(WebElement frameElement)
WebDriver.TargetLocator
WebElement
.frame
in interface WebDriver.TargetLocator
frameElement
- The frame element to switch to.WebDriver.findElement(By)
public WebDriver parentFrame()
WebDriver.TargetLocator
parentFrame
in interface WebDriver.TargetLocator
public WebDriver window(java.lang.String windowHandleOrName)
WebDriver.TargetLocator
window
in interface WebDriver.TargetLocator
windowHandleOrName
- The name of the window or the handle as returned by
WebDriver.getWindowHandle()
public WebDriver defaultContent()
WebDriver.TargetLocator
defaultContent
in interface WebDriver.TargetLocator
public WebElement activeElement()
WebDriver.TargetLocator
activeElement
in interface WebDriver.TargetLocator
public Alert alert()
WebDriver.TargetLocator
alert
in interface WebDriver.TargetLocator