Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Select Window</strong></p> <p>For this you will need to use the <code>selectWindow | windowName</code> command.</p> <p>To go back to the main window from the other window then do <code>selectWindow | null</code> </p> <blockquote> <pre><code>Arguments: * windowID - the JavaScript window ID of the window to select Selects a popup window using a window locator; once a popup window </code></pre> <p>has been selected, all commands go to that window. To select the main window again, use null as the target.</p> <pre><code>Window locators provide different ways of specifying the window object: </code></pre> <p>by title, by internal JavaScript "name," or by JavaScript variable.</p> <pre><code> * title=My Special Window: Finds the window using the text that </code></pre> <p>appears in the title bar. Be careful; two windows can share the same title. If that happens, this locator will just pick one. * name=myWindow: Finds the window using its internal JavaScript "name" property. This is the second parameter "windowName" passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag) (which Selenium intercepts). * var=variableName: Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name in the current application window, e.g. "window.foo = window.open(url);". In those cases, you can open the window using "var=foo".</p> <pre><code>If no window locator prefix is provided, we'll try to guess what you </code></pre> <p>mean like this:</p> <pre><code>1.) if windowID is null, (or the string "null") then it is assumed the </code></pre> <p>user is referring to the original window instantiated by the browser).</p> <pre><code>2.) if the value of the "windowID" parameter is a JavaScript variable </code></pre> <p>name in the current application window, then it is assumed that this variable contains the return value from a call to the JavaScript window.open() method.</p> <pre><code>3.) Otherwise, selenium looks in a hash it maintains that maps string </code></pre> <p>names to window "names".</p> <pre><code>4.) If that fails, we'll try looping over all of the known windows </code></pre> <p>to try to find the appropriate "title". Since "title" is not necessarily unique, this may have unexpected behavior.</p> <pre><code>If you're having trouble figuring out the name of a window that you want </code></pre> <p>to manipulate, look at the Selenium log messages which identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messages like the following for each window as it is opened:</p> <pre><code>debug: window.open call intercepted; window ID (which you can </code></pre> <p>use with selectWindow()) is "myNewWindow"</p> <pre><code>In some cases, Selenium will be unable to intercept a call to </code></pre> <p>window.open (if the call occurs during or before the "onLoad" event, for example). (This is bug SEL-339.) In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").</p> </blockquote> <p>selectWindow(windowID)</p> <p><strong>selectPopup</strong></p> <p>If it is a popup then do <code>selectPopUp | windowId</code> and then to go back to the main window do <code>selectWindow | null</code></p> <p><code>selectPopUp(windowID)</code> Arguments:</p> <ul> <li>windowID - an identifier for the popup window, which can take on a number of different meanings</li> </ul> <p>Simplifies the process of selecting a popup window (and does not offer functionality beyond what selectWindow() already provides).</p> <ul> <li>If windowID is either not specified, or specified as "null", the first non-top window is selected. The top window is the one that would be selected by selectWindow() without providing a windowID . This should not be used when more than one popup window is in play.</li> <li>Otherwise, the window will be looked up considering windowID as the following in order: <ol> <li>The "name" of the window, as specified to window.open()</li> <li>A JavaScript variable which is a reference to a window</li> <li>The title of the window. This is the same ordered lookup performed by selectWindow</li> </ol></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload