This tutorial post of selenium IDE will describe you how to use "verifyNotText" and "verifyNotTitle" commands for your software application to verify text and title of the page. However you can read more tutorial posts on assertion commands and verification commands for your reference. "verifyNotText"
command works for any page element's text and "verifyNotTitle" is used for title of the page.
Selenium IDE assertion "verifyNotText" Command
"verifyNotText" will check the text of targeted element and return error like '[error] Actual value 'Ready!' did match 'Ready!'' if both text match. Else it will be pass.
"verifyNotTitle" Command
Same as "verifyNotTitle" command, It will return error like '[error] Actual value 'Only Testing: Testing' did match 'Only Testing: Testing'' in log if expected title value and actual title value match. Else it will pass.
Remember one thing - Selenium will not stop its execution even if any verification command("verifyNotText" or "verifyNotTitle") fails during execution. Let we take simple example for both the commands.
New Test | ||
Command | Target | Value |
open | http://only-testing-blog.blogspot.com/2013/09/testing.html | |
verifyNotText | css=#timeLeft | Ready! |
verifyNotTitle | Testing | |
pause | 11000 | |
verifyNotText | css=#timeLeft | Ready! |
verifyNotTitle | Only Testing: Testing |
Run above example in selenium IDE and look at result. First time both "verifyNotText" and "verifyNotTitle" commands will be pass because first time expected and actual title did not match. But 2nd time both commands will fail because on that stage expected text will match actual text and expected title will match actual title.
Hello all,
ReplyDeletePlease i need help, saw i'm testing my application with Selenium IDE but i've some problems with VerifyText; i've got Error like: Actual value "Hello!" did not match with "Hello!", they are the same, i've change commmand i've use:
StoreText|//div[@id='form_body_without_padding']/form/table/tbody/tr[2]/td/div|td
Store|Hello!|tl
VerifyEval|javascript{storedVars['tl']==storedVars['td']
the texts are the same but i've got Error.
Thank you very much for help.