Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

How can I enable or disable link checking in my script ?

How can I enable or disable link checking in my script ?

The link checking option in SETTINGS | ACTIVE PROFILE | WEB | VERIFICATION will check the validity of hyperlinks in HTML documents.

The HTML document is parsed on receipt, and additional requests are sent to check that hyperlinks on that page are valid.

There may be instances, however, when you wish to do link checking for only certain pages in your script but do not wish to do link checking for other pages.

Take for example, if testing is being done on a server and you know that all links for 'page2.htm' are not yet ready, then you will not want link checking to be done for this page as it will generate unnecessary errors.

You can turn link checking on and off at will in your script by using the WebSetOption as follows :-

  WebSetOption(WEB_OPT_LINK_CHECK, 0);   // 0 Turns link checking off

  WebPageUrl ("http://www.my_server.com/page2.htm");

  WebSetOption(WEB_OPT_LINK_CHECK, 1); // 1 turns link checking on

The WebSetOption function above will simply turn off the link checker (using the 0 parameter) and then turn it back on again for the remainder of the script (using the 1 parameter).

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 19:00
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.