Both

From UBot Studio
(Difference between revisions)
Jump to: navigation, search
Line 3: Line 3:
 
This function returns true if both conditions return true. In this case you are setting two conditions that must both return true in order to execute the commands inside the Then node.  
 
This function returns true if both conditions return true. In this case you are setting two conditions that must both return true in order to execute the commands inside the Then node.  
  
This command allows you to insert other qualifiers inside it.  
+
This command allows you to insert other qualifiers inside it.
 +
 
 +
'''First Condition:''' The first condition to meet in the both qualifier.
 +
 
 +
'''Second Condition:''' The second condition to meet in the both qualifier.  
  
  

Revision as of 19:45, 25 April 2013

This function is a Qualifier Function.

This function returns true if both conditions return true. In this case you are setting two conditions that must both return true in order to execute the commands inside the Then node.

This command allows you to insert other qualifiers inside it.

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

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


Example

navigate("google.com", "Wait")
if($both($exists(<href="/files/ScriptReferences//TheMenus.pdf">), $exists(<innertext="Sample Scripts and Bot Templates">))) {
    then {
    }
    else {
        navigate("http://www.ubotstudio.com/resources", "Wait")
    }
}

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

If both 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:Both.png

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox