In Popup

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
Line 2: Line 2:
 
This command is a [[Flow Commands|Flow Command]]. This command runs all contained commands inside a previously opened popup from a webpage.
 
This command is a [[Flow Commands|Flow Command]]. This command runs all contained commands inside a previously opened popup from a webpage.
  
== Example ==
+
== Example 1 ==
 
<pre>
 
<pre>
 
allow popups("In New Window")
 
allow popups("In New Window")
Line 19: Line 19:
  
 
[[File:inpopup.png]]
 
[[File:inpopup.png]]
 +
 +
 +
 +
 +
== Example 2 ==
 +
 +
 +
This example will simply click an item in the new window.
 +
 +
 +
<pre>
 +
 +
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")
 +
}
 +
</pre>

Revision as of 19:19, 13 September 2014

This command is a Flow Command. This command runs all contained commands inside a previously opened popup from a webpage.

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.


File:Inpopup.png



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")
}
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox