Search Page
From UBot Studio
(Difference between revisions)
(Created page with " This function is a Qualifier Function. This function returns whether or not the specified text is present on the current page. This function is used ...") |
(→Example) |
||
Line 22: | Line 22: | ||
If the word exists on the page, the script navigates to google.com. | If the word exists on the page, the script navigates to google.com. | ||
+ | |||
[[File:searchpage0.png]] | [[File:searchpage0.png]] | ||
Line 40: | Line 41: | ||
</pre> | </pre> | ||
− | If the word does not exist on the page, the script will navigate to | + | If the word does not exist on the page, the script will navigate to ubotstudio.com/resources |
+ | |||
[[File:searchpage.png]] | [[File:searchpage.png]] |
Revision as of 16:35, 6 January 2013
This function is a Qualifier Function. This function returns whether or not the specified text is present on the current page. This function is used inside a conditional statement such as if/then.
Example
navigate("ubotstudio.com/resources", "Wait") wait(5) if($search page("Sample")) { then { navigate("google.com", "Wait") } else { navigate("ubotstudio.com/resources", "Wait") } }
The script above uses the search page function to search for the word "Sample" on the current page.
If the word exists on the page, the script navigates to google.com.
navigate("google.com", "Wait") wait(5) if($search page("Sample")) { then { navigate("google.com", "Wait") } else { navigate("ubotstudio.com/resources", "Wait") } }
If the word does not exist on the page, the script will navigate to ubotstudio.com/resources