|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface WebDriver.TargetLocator
Used to locate a given frame or window.
Method Summary | |
---|---|
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 index)
Select a frame by its (zero-based) index. |
WebDriver |
frame(java.lang.String nameOrId)
Select a frame by its name or ID. |
WebDriver |
frame(WebElement frameElement)
Select a frame using its previously located WebElement . |
WebDriver |
window(java.lang.String nameOrHandle)
Switch the focus of future commands for this driver to the window with the given name/handle. |
Method Detail |
---|
WebDriver frame(int index)
index
- (zero-based) index
NoSuchFrameException
- If the frame cannot be foundWebDriver frame(java.lang.String nameOrId)
nameOrId
- the name of the frame window, the id of the <frame> or <iframe>
element, or the (zero-based) index
NoSuchFrameException
- If the frame cannot be foundWebDriver frame(WebElement frameElement)
WebElement
.
frameElement
- The frame element to switch to.
NoSuchFrameException
- If the given element is neither an IFRAME nor a FRAME element.
StaleElementReferenceException
- If the WebElement has gone stale.WebDriver.findElement(By)
WebDriver window(java.lang.String nameOrHandle)
nameOrHandle
- The name of the window or the handle as returned by
WebDriver.getWindowHandle()
NoSuchWindowException
- If the window cannot be foundWebDriver defaultContent()
WebElement activeElement()
Alert alert()
NoAlertPresentException
- If the dialog cannot be found
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |