Text Check Verification in Web Click and Script

Text Check Verification in Web Click and Script

Use the Verification argument in the Description section of a function.

Note:
LoadRunner 8.1 FP4 is required for this feature.

The Verification argument in the Description section can be used in the following functions:

  • web_browser
  • web_element
  • web_list
  • web_text_link
  • web_table
  • web_text_area

Web_XXX("some name",
DESCRIPTION,
?
VERIFICATION,
["ContainsText[/RE]=some text",]
["DoesNotContainText[/RE]=some text",]
[ACTION,]
?
LAST);

Examples:
web_browser("Sync",
"Snapshot=t2.inf",
DESCRIPTION,
ACTION,
"Sync",
VERIFICATION,
"ContainsText=Products",
LAST);

The Verification will pass if the resulting page has the word "Products" in it.

web_browser("Sync",
"Snapshot=t2.inf",
DESCRIPTION,
ACTION,
"Sync",
VERIFICATION,
"ContainsText/RE=Prod*",
LAST);

The Verification will pass if the resulting page has the string "Prod" followed by any characters.

Note:
Without the "/RE" the actual string Prod* will be searched for and if this is not found the Verification will fail.

web_browser("Sync",
"Snapshot=t2.inf",
DESCRIPTION,
ACTION,
"Sync",
VERIFICATION,
"DoesNotContainText=Junkcharactersasdfgf;lkjhj",
LAST);

The Verification will pass if the string "Junkcharactersasdfgf;lkjhj" is not found.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s