Wait For Browser Event
(Created page with "This command waits for a browser event to happen such as a page being loaded and DOM ready. The options for browser events are: DOM Ready (To read more about DOM, please see ...") |
|||
(6 intermediate revisions by one user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | + | This command is a [[Flow Commands|Flow Command]]. This command waits for a browser event to happen such as a page being loaded and DOM ready. | |
− | + | ||
− | + | ||
− | [[File: | + | '''Event to Wait For:''' The behavior the command will be waiting for in the main browser. The options are the following: |
+ | |||
+ | *DOM Ready (To read more about DOM, please see [http://www.w3.org/TR/DOM-Level-2-Core/introduction.html].) | ||
+ | |||
+ | *Page Loaded | ||
+ | |||
+ | *Everything Loaded | ||
+ | |||
+ | |||
+ | Clicking the Advanced option on the command expands and reveals another option. | ||
+ | |||
+ | '''Timeout (in seconds):''' The command will move on to the next command if the browser event does not occur within the amount of seconds specified here. | ||
+ | |||
+ | |||
+ | [[File:waitforbe.jpg]] | ||
== Example == | == Example == | ||
Line 16: | Line 26: | ||
Running the script will wait until the DOM is ready before continuing on with the rest of the script. | Running the script will wait until the DOM is ready before continuing on with the rest of the script. | ||
+ | |||
<pre> | <pre> | ||
Line 23: | Line 34: | ||
</pre> | </pre> | ||
− | Running the script will wait until the | + | Running the script will wait until the Page is loaded before continuing on with the rest of the script. |
+ | |||
<pre> | <pre> | ||
Line 31: | Line 43: | ||
</pre> | </pre> | ||
− | Running the script will wait until | + | Running the script will wait until Everything on that page is finished loading before continuing on with the rest of the script. |
Latest revision as of 18:02, 16 September 2013
This command is a Flow Command. This command waits for a browser event to happen such as a page being loaded and DOM ready.
Event to Wait For: The behavior the command will be waiting for in the main browser. The options are the following:
- DOM Ready (To read more about DOM, please see [1].)
- Page Loaded
- Everything Loaded
Clicking the Advanced option on the command expands and reveals another option.
Timeout (in seconds): The command will move on to the next command if the browser event does not occur within the amount of seconds specified here.
[edit] Example
navigate("google.com", "Wait") wait for browser event("DOM Ready", "") type text(<name="q">, "Holidays", "Standard")
Running the script will wait until the DOM is ready before continuing on with the rest of the script.
navigate("google.com", "Wait") wait for browser event("Page Loaded", "") type text(<name="q">, "Holidays", "Standard")
Running the script will wait until the Page is loaded before continuing on with the rest of the script.
navigate("google.com", "Wait") wait for browser event("Everything Loaded", "") type text(<name="q">, "Holidays", "Standard")
Running the script will wait until Everything on that page is finished loading before continuing on with the rest of the script.