Either

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
(Example)
 
(One intermediate revision by one user not shown)
Line 20: Line 20:
  
 
</pre>
 
</pre>
 +
  
 
Running the script above will check the page to see if the either of the two specified elements in the [[exists]] qualifier exists on the page.
 
Running the script above will check the page to see if the either of the two specified elements in the [[exists]] qualifier exists on the page.
Line 25: Line 26:
 
If either one of those items exists on the page, the script does nothing. If both elements do not exist on the page, then the script navigates to the specified url in the navigate command.  
 
If either one of those items exists on the page, the script does nothing. If both elements do not exist on the page, then the script navigates to the specified url in the navigate command.  
  
[[File:either.png]]
+
 
 +
[[File:either.jpg]]

Latest revision as of 18:44, 29 September 2013

This function is a Qualifier Function. This function returns true if either of the two conditions are true. This command allows you to insert other qualifiers inside it.

First Condition: The first condition to meet in the either qualifier.

Second Condition: The second condition to meet in the either qualifier.


[edit] Example

navigate("google.com", "Wait")
if($either($exists(<innertext="FEATURES">), $exists(<innertext="Video Training in Ten Minutes or Less!">))) {
    then {
    }
    else {
        navigate("http://www.ubotstudio.com/resources", "Wait")
    }
}


Running the script above will check the page to see if the either of the two specified elements in the exists qualifier exists on the page.

If either one of those items exists on the page, the script does nothing. If both elements do not exist on the page, then the script navigates to the specified url in the navigate command.


Either.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox