Create a check for the existence of the selected text
Please read the Terms of Use for Materials on ZennoLab
Table of contents
Description
This action serves, as it is not difficult to guess, to check whether there is a certain text on the page or not.
This is not a single action, but a group of actions:
This is a deprecated feature. Starting with ZennoPoster 7.3.1.0, a new action is used - Check for the existence of text
How to add an action to a project?
In the ProjectMaker browser, select the text for which you want to create a check.
Click on the selected text right click and select the item Create a check for the existance of the selected text
A dialog box will appear to check if the selection is correct. If everything is correct, then click OK. The text in this window can be edited.
Two actions will be automatically created - Text checking and a logical if check .
If the desired text is found on the page, the if cube will succeed (exit on the green line), otherwise - with an error (red line).
Always double-check the correctness of this action: both when the text is on the page, and when it is not. There are times when there is no text, but this action finds it and the exit will be on the green line. All this is due to the peculiarities of the layout of a particular site - the text is hidden for the user, but the program βseesβ it.
What is it used for?
Catching errors, or vice versa, checking the success of one or another action
When registering
When posting
On page load
When recognizing captcha
Usage example
Checking that the page has loaded successfully.
Problem: the site does not always load correctly (especially if you use not very high-quality proxy ) - the page may not load (it will be empty, white), or an HTTP error may appear (404, 403, 503, etc.).
Possible solution: find static text on the page (which never changes) and after going to the site look for this text on the page. If the text is not found, then the page has not loaded. In this case, using a loop and a transition cube go to page, we try to reload the page several times, each time trying to find the desired text.