In Popup
From UBot Studio
(Difference between revisions)
(→Example 2) |
|||
(One intermediate revision by one user not shown) | |||
Line 18: | Line 18: | ||
− | [[File:inpopup0. | + | [[File:inpopup0.jpg]] |
Line 32: | Line 32: | ||
allow popups("In New Window") | allow popups("In New Window") | ||
− | navigate("http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open", "Wait") | + | navigate("http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open","Wait") |
wait(3) | wait(3) | ||
− | click(<innertext="Try it">, "Left Click", "No") | + | click(<innertext="Try it">,"Left Click","No") |
wait(3) | wait(3) | ||
in popup { | in popup { | ||
− | click(<class="javascript">, "Left Click", "No") | + | click(<class="javascript">,"Left Click","No") |
+ | close page | ||
} | } | ||
+ | |||
</pre> | </pre> |
Latest revision as of 22:19, 7 November 2017
This command is a Flow Command. This command runs all contained commands inside a previously opened popup from a webpage.
[edit] Example 1
allow popups("In New Window") navigate("http://www.javascript-coder.com/files/window-popup/javascript-window-open-example1.html", "Wait") click(<href="javascript: openwindow()">, "Left Click", "No") wait(4) in popup { set(#header, $scrape attribute(<title="Permanent link to jQuery Popups">, "innertext"), "Global") close page }
Running the script will scrape the specified item within the new pop up window on the left side of the browser.
[edit] Example 2
This example will simply click an item in the new window.
allow popups("In New Window") navigate("http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_open","Wait") wait(3) click(<innertext="Try it">,"Left Click","No") wait(3) in popup { click(<class="javascript">,"Left Click","No") close page }