Extracting a Web Page's Content using Delimiters

The Text tab in the Parse/Check view (bottom part of the HTTP Data window) can be used to add a SubStr function on an HTTP request.
This function extracts a substring from a web page by locating it with left and right delimiters and an optional offset or occurence.



The left delimiter can be:

The right delimiter can be:

If you want to extract the Nth occurence of a character string, check the Random/Occurence/Offset option, check the Occurence option and specify an occurence in the Occurence field.

If you want to extract a random occurence of a character string, check the Random/Occurence/Offset option and check the Random option.

There are occasions when it is useful to use the above methods starting from some point within the web page, rather than at the beginning. This can be achieved by resetting the selection base.
This can be done by checking the Random/Occurence/Offset option, checking the Offset options and specifying:

The following options can be specified:

No Case  All specified string comparisons are by default case sensitive. The case of characters can be ignored in comparisons by checking the No case option.
Regular Expression String delimiters are treated like regular expressions. See Regular Expressions in AgileLoad for more information about regular expressions syntax supported.
Exclude  By default, the delimiter strings specified (left and right) are included in the returned substring. Both delimiters may be excluded from the returned substring by specifying the Exclude option. 
Reverse  With Occurrence option checked, occurrence count starts from the end.
With Offset and Position options checked, the index of the character started from the end in the string to begin the search with.
With Offset and String options checked, the string identifies the character string from the end to begin the search with.


 

See also:

 





Go back to the Learning center:


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