Definition and Usage
The Else If webpage contains command is used when the preceding If command condition is not true, but you still want to check for another condition. This command allows you to check for additional conditions without having to write a completely new If command.
This command is particularly useful when you need to check multiple conditions and execute different actions based on the results. For example, you can use it to check whether a specific text is present on a webpage when the previous condition was not met. If the condition is true (the text is found), subsequent actions will be executed.
Note: The Else If webpage contains command must be used in conjunction with an If command and Go to webpage command.
Paramter Values
Parameter | Description |
Web page | Select a web page. |
Check if | Select a condition to be checked. |
Element | Select an element from the target web page using the +Capture function 偶然choose a previously added element from the dropdown list. |
Example
This workflow will start by navigating to the "https://www.octoparse.ai" page and saving the website URL as a variable named "webPage". Then it goes to check whether the webPage is empty. Since it is false, the workflow will look for the text "started" on the page. If it finds the text, it will print an information log that reads "Get started with Octoparse AI", and the workflow will be completed.