tab or return in HTTP content test?

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

tab or return in HTTP content test?

Post by sneader »

I want to monitor a web site to see when the content changes a certain way. Here's the HTML that I want to look at:

Code: Select all

<ul>
	<li>05/02/2007 
It appears there is a carriage return after the <ul>, and then perhaps a tab in front of the <li>

The contents field is only one line, and when I paste the above into HostMon it only displays the <ul>

Any ideas how I could test for the above HTML? Unfortunately, I don't have the ability to tell the web page provider to not use returns and tabs in their code.

Thanks for any pointers.
KS-Soft Europe
Posts: 2832
Joined: Tue May 16, 2006 4:41 am
Contact:

Post by KS-Soft Europe »

URL test offers "use expression" mode to search something in the returned page. Quote from the manual:
http://www.ks-soft.net/hostmon.eng/mfra ... ts.htm#url
=======================
Mode
This option determines condition to check. Choose one of the available modes:
- should contain - HostMonitor will set "Bad contents" status when page does not contain specified string
- should not contain - HostMonitor will set "Bad contents" status when page contains specified string
- use expression - HostMonitor will consider the string as Boolean (logical) expression, evaluate expression using data received from the server, and set "Bad contents" status when retrieved page does not satisfy the required conditions.
For example: if you define expression like "'No errors' and not ('Error' or 'Warning')", then HostMonitor will mark test as "Host is alive" when retrieved page contains string 'No error' and does not contain either 'Error' or 'Warning'
Expression
Enter a string of text to check the returned page. Remember that HTML tags are part of a document, so include the HTML tags if they are part of the text you are searching for (for example, "<B>Hello</B> World").
If you chose "use expression" mode, you may use expressions like "("Total" and "End Of Page") and not ('Error' or 'Warning')". In this case, a test will have a "Host is alive" status when monitor can receive specified page and this page contains both strings "Total" and "End Of Page", and doesn't contain either strings "Error" or "Warning". In the expression you may use strings (must be concluded in quotes (') or in double quotes (")); round brackets; logical operators "and", "or", "not".
=======================

So, you may try expression like: "("<ul>" and "<li>")". However, such method may not work for you if returned document contains several <li> and <ul> tags.

Does it suit your needs?

Regards,
Max
sneader
Posts: 90
Joined: Thu Dec 22, 2005 3:32 pm

Post by sneader »

Thanks for trying, Max. Unfortunately, you are right, there are plenty of <ul> and <li> tags on the page. Maybe if I could figure out the escape sequence or whatever for a carriage return and tab, I could make this work.

- Scott
Post Reply