With Every Cell in Row
From UBot Studio
(Difference between revisions)
(Created page with " This command is an Advanced Table command. This command loops through every cell in a row. '''Table:''' Table with content being used in the script. '''Row:''' Row the ...") |
|||
(3 intermediate revisions by one user not shown) | |||
Line 6: | Line 6: | ||
'''Row:''' Row the script will be looping through. | '''Row:''' Row the script will be looping through. | ||
− | '''Variable:''' Variable each table cell will be set to. The variable is then inserted into other commands inside the With Every | + | '''Variable:''' Variable each table cell in the row will be set to. The variable is then inserted into other commands inside the With Every Cell in Row command. |
== Example == | == Example == | ||
Line 16: | Line 16: | ||
with every cell in row(&my table,0,#mytablerows) { | with every cell in row(&my table,0,#mytablerows) { | ||
navigate("http://www.ubotstudio.com/playground/simple-form","Wait") | navigate("http://www.ubotstudio.com/playground/simple-form","Wait") | ||
− | type text(<username field>,# | + | type text(<username field>,#mytablerows,"Standard") |
} | } | ||
Line 22: | Line 22: | ||
− | 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 row. The script within the With Every | + | 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 row. |
+ | |||
+ | The script within the With Every Cell in Row command will repeat for each table cell item on the table row, and stop once it reaches the end of the row. | ||
+ | |||
+ | |||
+ | |||
+ | [[File:witheverytablecellrow.jpg]] |
Latest revision as of 17:04, 6 June 2015
This command is an Advanced Table command. This command loops through every cell in a row.
Table: Table with content being used in the script.
Row: Row the script will be looping through.
Variable: Variable each table cell in the row will be set to. The variable is then inserted into other commands inside the With Every Cell in Row 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 row(&my table,0,#mytablerows) { navigate("http://www.ubotstudio.com/playground/simple-form","Wait") type text(<username field>,#mytablerows,"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 row.
The script within the With Every Cell in Row command will repeat for each table cell item on the table row, and stop once it reaches the end of the row.