Google Search

Wednesday, October 23, 2013

verifyTextPresent, verifyElementPresent and verifyText Commands

“verifyTextPresent” command is used to verify that the Text is present somewhere on the webpage. It only takes one argument i.e. the text pattern to be verified.
Command
Target
Value
verifyTextpresent
Welcome to my Blog



This command should only be used, when you want to search if the text is present somewhere in the website, this should not be used when you also want to verify the location of the text.
“verifyElementpresent” command is used, when you want to verify if a element is present on the webpage irrespective of its content.b This verification does not check the content , only the HTML tag.
Command
Target
Value
verifyElementpresent
//div/p/a


The above example looks for a link tag under <div> and <a> HTML tag. This verification can be used to look for any HTML UI Element.
“verifyText” is used where both HTML element and text needs to be verified. This command must use a locator.

Command
Target
Value
verifyText
//div/p/a
This is my First Link

No comments:

Post a Comment