HTML_GetURL Function

Description:

The HTML_GetURL function returns an URL starting from its text displayed in a browser.

Format:

HTTP GET HOST Hostname URL url szURL = HTML_GetURL(options, urlDisplay);
HTTP GET HOST Hostname URL url szURL = HTML_GetURL(options, urlDisplay, urlDisplayIndex);
szURL = HTML_GetURL(inputHtml, urlDisplay);
szURL = HTML_GetURL(inputHtml, urlDisplay, urlDisplayIndex);

Parameters:

szURL

A string variable into which the URL will be loaded.

options

Available options are:

CONTENT  The function is applied on the current HTTP response 

urlDiplay

A string expression containing the text shown in a browser for the URL to find.

urlDiplayIndex

An integer expression containing the index of the URL text to find.

inputHtml

A string expression containing HTML from which the function will extract the URL.

Example:

STRING szURL;
STRING szHTML;

// Retrieve the URL for "financial news" link
HTTP GET HOST "demo.fmstocks.com" URL "/fmstocks/home.asp" szURL = HTML_GetURL(content, "financial news");

HTTP GET HOST "demo.fmstocks.com" URL "/fmstocks/home.asp" szHTML = GetContent();
szURL = HTML_GetURL(szHTML, "financial news");

LOG "szURL = " + szURL;

Output:

szURL = news.asp

See also:





Go back to the Learning center:


Copyright © AgileLoad. All rights reserved.
Agile Load testing tool| Contact AgileLoad | Terms of Use | Sitemap