With Every Cell in Column
From UBot Studio
(Difference between revisions)
(→Example) |
|||
Line 14: | Line 14: | ||
wait(8) | wait(8) | ||
scrape table(<innertext="First Name">,&my table) | scrape table(<innertext="First Name">,&my table) | ||
− | with every cell in | + | with every cell in column(&my table,0,#mytablecolumn) { |
navigate("http://www.ubotstudio.com/playground/simple-form","Wait") | navigate("http://www.ubotstudio.com/playground/simple-form","Wait") | ||
type text(<username field>,#mytablecolumn,"Standard") | type text(<username field>,#mytablecolumn,"Standard") |
Latest revision as of 20:01, 30 September 2016
This command is an Advanced Table command. This command loops through every cell in a column.
Table: Table with content being used in the script.
Column: Column the script will be looping through.
Variable: Variable each table cell in the column will be set to. The variable is then inserted into other commands inside the With Every Cell in Column command.
[edit] Example
navigate("http://www.w3schools.com/html/html_tables.asp","Wait") wait(8) scrape table(<innertext="First Name">,&my table) with every cell in column(&my table,0,#mytablecolumn) { navigate("http://www.ubotstudio.com/playground/simple-form","Wait") type text(<username field>,#mytablecolumn,"Standard") }
Running the command will scrape a table, navigate to the specified url, and fill the specified field with the first table cell item in the specified column.
The script within the With Every Cell in Column command will repeat for each table cell item on the table column, and stop once it reaches the end of the column.