Related topic:
Check out this link if you want to configure
content check through the Chrome Extension (Web Transaction Recorder).
Content Check option
Applications Manager's Real Browser Monitoring allows to configure content check to be done on the webpages in between the steps. One can configure checks for both Content to be present and Content not to be present.
Syntax of the script:
- assert_text_present( "<text>", "<true/false>" ) -> Checks if the given text is present
- assert_text_not_present( "<text>", "<true/false>" ) -> Checks if the given text is not present
Proceed with further steps?
Applications Manager also provides an option to allow the user to choose whether to proceed with further steps (if any) in the transaction or not. The second parameter in the above script accepts Boolean (True/False) values only, based on which Applications manager decides whether to proceed with further steps or not, when the content check operation fails.
Definitions
First parameter - Text content that needs to be verified for the presence in the webpage.
Second parameter - To decide whether to proceed with further steps or not, when the content check operation fails.
Examples:
- assert_text_present("Applications", "true") -> This script checks if the word 'Applications' is present and continues to the next step even if the word is not present.
- assert_text_present("Applications", "false") -> This script checks if the word 'Applications' is present and continues to the next step only if the word is present.
Steps to configure content check
- Visit the monitor details page of corresponding Real Browser Monitor.
- Choose "Monitor Actions" -> "Edit Playback Script" option. 'Real browser script viewer' window will be opened as a pop up.
- In the pop up dialog box, search for the step to which the content check needs to be added.
- Add the script line, referring to the syntax as mentioned above, based on your requirement. The requirement might vary
- Whether to check if the text is present or not present.
- Whether to check the content before or after the intended action.
- Example for 'assert_text_present':
- Example for 'assert_text_not_present':
Applications Manager also provides an option to allow the user to check for specific title value for any window or browser tab. It accepts only one parameter, the title which is to be checked. In case of failure, the data collection will be stopped at that particular step itself, and an alert will be triggered for the monitor.
Syntax of the script:
assert_title("<title>") -> This script checks if the title of the current window is the given text.
Example for 'assert_title':
Note: 'assert_title' script works case sensitive. Provide the title to be checked in exact case.