Skip to main content
All CollectionsUnderstand the CommandsIf
[Command] If web page contains
[Command] If web page contains
Sophie avatar
Written by Sophie
Updated over 6 months ago

Definition and Usage

The If web page contains command is used for checking if a specified text or element can be found on a web page and executes a set of commands if found.

Note: The If web page contains command must be used with a Go to web page command and an End If command.


Parameters Values

Parameter

Definition

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, a previously added element from the dropdown list, or input a text to be checked with.


Example

This workflow will start by navigating to the "https://octoparse.com" page and saving the website URL as a variable named "octoparse_website". Next, it will look for the text "free" on the page. If it finds the text, it will print an information log that reads "Octoparse is free!", and the workflow will be completed.

Did this answer your question?