Skip to main content
All CollectionsUnderstand the CommandsWebpage Automation
[Command] Get relative element on web page
[Command] Get relative element on web page
Sophie avatar
Written by Sophie
Updated over a week ago

Definition and Usage

The Get relative element on web page command is used to instruct the workflow to obtain some web elements that cannot be captured directly, which can be obtained by capturing their parent, child, and sibling elements correspondingly, and is generally used with Loop similar elements on webpage command.


Parameters Values

Set parameters

Parameter

Definition

Web page

Select a target web page. There are 2 commands that can be used to generate a web page variable:

  • Go to web page

  • Find web page

Element

Select an element as the axis by capturing a new element or selecting from a previously saved element

Relationship

Choose a relationship to the axis element to proceed

  • Parent element

  • Preceding sibling element

  • Following sibling element

  • First descendant element

  • All child elements

  • Specific child element

Save element as

Name the variable generated by the parameters above

Advanced settings

Parameter

Definition

Wait for element

Wait for a specified amount of time (seconds) until the element appears

Error handling

Parameter

Definition

When error occurs

Select the action to be performed when an error occurs

  • Terminate the project

  • Ignore the error and execute the next command

  • Retry action


Example

The workflow below will go to www.amazon.com/gp/bestsellers on the built-in browser, save the webpage as a variable named AmazonBestSeller, and get the parent element of the axis element named "Div_FirstPicture" on the webpage, save the variable and name it as "Parent_Element_of_FirstPic", print it to log with its link attribute.

Did this answer your question?