Wait For Element

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
  
This command is a [[Flow Commands|Flow Command]]. This command allows you to delay the script until an element on the page is present. It can be used to slow down the flow of a script to make sure fields are loaded and pages have finished loading before fields are field or items are clicked.
+
This command is a [[Flow Commands|Flow Command]]. This command allows you to delay the script until an element on the page is present.  
 +
 
 +
It can be used to slow down the flow of a script to make sure fields are loaded and pages have finished loading before fields are field or items are clicked.
 +
 
 +
 
 +
'''Element To Wait For:''' The element the command will be waiting. Choose an element using one of the selector tools. (See [[The Selectors]] for more information)
 +
 
 +
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 element does not appear or disappear within the amount of seconds specified here.
 +
 
 +
'''Wait for Element to Appear or Disappear:''' The behavior the command will be waiting for (the element is appearing or disappearing on the webpage).
  
 
== Example ==
 
== Example ==

Revision as of 15:06, 24 April 2013

This command is a Flow Command. This command allows you to delay the script until an element on the page is present.

It can be used to slow down the flow of a script to make sure fields are loaded and pages have finished loading before fields are field or items are clicked.


Element To Wait For: The element the command will be waiting. Choose an element using one of the selector tools. (See The Selectors for more information)

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 element does not appear or disappear within the amount of seconds specified here.

Wait for Element to Appear or Disappear: The behavior the command will be waiting for (the element is appearing or disappearing on the webpage).

Example

navigate("www.bing.com", "Wait")
wait for element(<name="q">, "", "Appear")
type text(<name="q">, "this is a test", "Standard")
wait(2)
click(<name="go">, "Left Click", "No")

The script above will wait until the search field has loaded before continuing on with the rest of the script.

File:Waitforelement.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox