forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
class_webdriver_WebDriver_TargetLocator.html
27 lines (27 loc) · 7.28 KB
/
class_webdriver_WebDriver_TargetLocator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!DOCTYPE html><meta charset="UTF-8"><title>webdriver.WebDriver.TargetLocator</title><link href="dossier.css" rel="stylesheet" type="text/css"><div id="main-wrapper"><input type="checkbox" id="sidenav-toggle" /><main><header><h1>Class webdriver.WebDriver.TargetLocator</h1><a class="source" href="source_javascript_webdriver_webdriver.js.src.html#l1322">code »</a></header><section><p>An interface for changing the focus of the driver to another frame or window.<h2>Constructor</h2><div class="ctor wrap-details public"><div><div class="ctor"><span class="member"><a name="webdriver.WebDriver.TargetLocator">webdriver.WebDriver.TargetLocator</a> <span class="args">(driver)</span></span></div><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>driver: <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code><dd>The parent driver.</dl></table></div></div></div></section><div id="visibility-controls"><b>Show:</b><label for="show-public"><span><input type="checkbox" id="show-public" checked/></span>Public</label><label for="show-protected"><span><input type="checkbox" id="show-protected"/></span>Protected</label><label for="show-private"><span><input type="checkbox" id="show-private"/></span>Private</label></div><section id="instance-methods"><h2>Instance Methods</h2><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source_javascript_webdriver_webdriver.js.src.html#l1335">code »</a><span class="member"><a name="activeElement">activeElement</a> <span class="args">()</span> ⇒ <code class="type">!<a href="class_webdriver_WebElement.html">webdriver.WebElement</a></code></span></div><p>Schedules a command retrieve the <code >document.activeElement</code> element on
the current document, or <code >document.body</code> if activeElement is not
available.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The active element.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source_javascript_webdriver_webdriver.js.src.html#l1409">code »</a><span class="member"><a name="alert">alert</a> <span class="args">()</span> ⇒ <code class="type">!<a href="class_webdriver_Alert.html">webdriver.Alert</a></code></span></div><p>Schedules a command to change focus to the active alert dialog. This command
will return a <code class="type"><a href="enum_bot_ErrorCode.html#bot.ErrorCode.NO_MODAL_DIALOG_OPEN">bot.ErrorCode.NO_MODAL_DIALOG_OPEN</a></code> error if a modal
dialog is not currently open.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>The open alert.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source_javascript_webdriver_webdriver.js.src.html#l1349">code »</a><span class="member"><a name="defaultContent">defaultContent</a> <span class="args">()</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to switch focus of all future commands to the first frame
on the page.</summary><div class="info"><table><tbody><tr><th>Returns<tr><td><dl>A promise that will be resolved when the
driver has changed focus to the default content.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source_javascript_webdriver_webdriver.js.src.html#l1375">code »</a><span class="member"><a name="frame">frame</a> <span class="args">(nameOrIndex)</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to switch the focus of all future commands to another
frame on the page.
<p/>
If the frame is specified by a number, the command will switch to the frame
by its (zero-based) index into the <code >window.frames</code> collection.
<p/>
If the frame is specified by a string, the command will select the frame by
its name or ID. To select sub-frames, simply separate the frame names/IDs by
dots. As an example, "main.child" will select the frame with the name "main"
and then its child "child".
<p/>
If the specified frame can not be found, the deferred result will errback
with a <code >bot.ErrorCode.NO_SUCH_FRAME</code> error.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>nameOrIndex: <code class="type">(<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a>|<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number">number</a>)</code><dd>The frame locator.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved when the
driver has changed focus to the specified frame.</dl></table></div></details></div></div><div class="wrap-details public"><div><details class="function"><summary><div><a class="source" href="source_javascript_webdriver_webdriver.js.src.html#l1395">code »</a><span class="member"><a name="window">window</a> <span class="args">(nameOrHandle)</span> ⇒ <code class="type">!<a href="class_webdriver_promise_Promise.html">webdriver.promise.Promise</a></code></span></div><p>Schedules a command to switch the focus of all future commands to another
window. Windows may be specified by their <code >window.name</code> attribute or
by its handle (as returned by <code >webdriver.WebDriver#getWindowHandles</code>).
<p/>
If the specificed window can not be found, the deferred result will errback
with a <code >bot.ErrorCode.NO_SUCH_WINDOW</code> error.</summary><div class="info"><table><tbody><tr><th>Parameters<tr><td><dl><dt>nameOrHandle: <code class="type"><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">string</a></code><dd>The name or window handle of the window to
switch focus to.</dl><tr><th>Returns<tr><td><dl>A promise that will be resolved when the
driver has changed focus to the specified window.</dl></table></div></details></div></div></section><section id="instance-properties"><h2>Instance Properties</h2><div class="wrap-details private"><div><details><summary><div><a class="source" href="source_javascript_webdriver_webdriver.js.src.html#l1325">code »</a><span class="member"><a name="driver_">driver_</a> : <code class="type">!<a href="class_webdriver_WebDriver.html">webdriver.WebDriver</a></code></span></div></summary></details></div></div></section></main><nav id="topnav"><div><div id="menubutton"><label for="sidenav-toggle">Menu</label></div><form id="searchbox"><div><input type="search" placeholder="Search" tabindex="1"></div></form></div></nav><nav id="sidenav"><input type="checkbox" id="sidenav-types-ctrl" /><input type="checkbox" id="sidenav-files-ctrl" /><a id="sidenav-overview"><div><h4>Overview</h4></div></a><div id="sidenav-types"><label for="sidenav-types-ctrl"><h4>Types</h4></label><i>No data</i></div><div id="sidenav-files"><label for="sidenav-files-ctrl"><h4>Files</h4></label><i>No data</i></div></nav><div id="push-footer"></div></div><footer><a href="https://github.com/jleyba/js-dossier">Generated by dossier</a></footer><script src="types.js"></script><script src="dossier.js"></script>