In Popup

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Created page with " This command is a Flow Command. This command runs all contained commands inside a previously opened popup from a webpage. == Example == <pre> allow popups(...")
 
(Example 2)
 
(5 intermediate revisions by one user not shown)
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")
 
navigate("http://www.javascript-coder.com/files/window-popup/javascript-window-open-example1.html", "Wait")
 
navigate("http://www.javascript-coder.com/files/window-popup/javascript-window-open-example1.html", "Wait")
 
click(<href="javascript: openwindow()">, "Left Click", "No")
 
click(<href="javascript: openwindow()">, "Left Click", "No")
wait(1)
+
wait(4)
 
in popup {
 
in popup {
 
     set(#header, $scrape attribute(<title="Permanent link to jQuery Popups">, "innertext"), "Global")
 
     set(#header, $scrape attribute(<title="Permanent link to jQuery Popups">, "innertext"), "Global")
Line 13: Line 13:
 
}
 
}
 
</pre>
 
</pre>
 +
  
 
Running the script will scrape the specified item within the new pop up window on the left side of the browser.
 
Running the script will scrape the specified item within the new pop up window on the left side of the browser.
  
[[File:inpopup.png]]
+
 
 +
[[File:inpopup0.jpg]]
 +
 
 +
 
 +
 
 +
 
 +
== 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")
 +
    close page
 +
}
 +
 
 +
</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.


Inpopup0.jpg



[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
}

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox