The Web-Mon plugin can monitor web page content and search for keywords inside. If the user wants the content to be displayed on the Active Console, the Extractor plugin can be used. This article provides an example where the target web page does not have any HTML tags (Content-Type: text/plain in the HTTP header).
In this article, we are using the following web page that displays a simple status message for illustration.
Option 1: Web-Mon plugin with Success Criteria
The Web-Mon plugin has a Success Criteria button located at each Stage which can specify a relative URL for the monitored web site. The Success Criteria option can monitor the HTTP response code (e.g. 200) and/or page content.
Users can specify one or more keywords and regular expressions to search for inside the page content. The following example checks for a single phrase "running normally" that should be present on the target web page.
Option 2: Data Transfer to Extractor plugin
If the user wants the content to be displayed on the Active Console, the Extractor plugin can be used. The Data Transfer button should be entered with a name (e.g. DT1 in this example), which can pass the content to the Extractor plugin.
Then the user should configure the Extractor plugin with the same Name in the Data Transfer option.
After that, the Custom button should be selected to specify how the target web page should be parsed. We will need to define some columns and rows as placeholders to display the contents. And because the web page does not have any HTML tags, the whole contents is considered to be placed under the XPath /html/body and text() functions.
The Active Console output is shown below.
We have also attached the Extractor plugin configuration in XML format with this article.