Element Parent
From UBot Studio
(Difference between revisions)
Line 12: | Line 12: | ||
navigate("http://www.w3schools.com/html/html_tables.asp", "Wait") | navigate("http://www.w3schools.com/html/html_tables.asp", "Wait") | ||
− | set(#parent, $scrape attribute($element parent(<innertext=" | + | set(#parent, $scrape attribute($element parent(<innertext="Jill">), "innertext"), "Global") |
− | + | ||
</pre> | </pre> | ||
− | Running the script above will return the parent of the item " | + | Running the script above will return the parent of the item "Jill" from the table. |
− | The parent of the item is | + | The parent of the item is a three column row with the values "Jill Smith 50". |
The element parent function returns the entire row to the variable. | The element parent function returns the entire row to the variable. | ||
− | |||
− | |||
− |
Revision as of 15:47, 24 December 2013
$Element Parent is a Browser Function.
This function returns the parent of a selected element.
The Element Selector is used to select an item.
Element: The desired page element.
Example
navigate("http://www.w3schools.com/html/html_tables.asp", "Wait") set(#parent, $scrape attribute($element parent(<innertext="Jill">), "innertext"), "Global")
Running the script above will return the parent of the item "Jill" from the table.
The parent of the item is a three column row with the values "Jill Smith 50".
The element parent function returns the entire row to the variable.