Wait For Element

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
 
(3 intermediate revisions by one user not shown)
Line 5: Line 5:
  
 
'''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)
 
'''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.
 
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.
 
'''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.
Line 23: Line 21:
 
click(<name="go">, "Left Click", "No")
 
click(<name="go">, "Left Click", "No")
 
</pre>
 
</pre>
 +
  
 
The script above will wait until the search field has loaded before continuing on with the rest of the script.
 
The script above will wait until the search field has loaded before continuing on with the rest of the script.
  
[[File:waitforelement.png]]
+
 
 +
[[File:waitforelement.jpg]]

Latest revision as of 22:09, 8 November 2017

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).


[edit] 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.


Waitforelement.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox