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).