SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Selenium IDE assertions "verifyNotText" and "verifyNotTitle" Command Examples

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
CommandTargetValue
openhttp://only-testing-blog.blogspot.in/2013/09/testing.html
verifyNotTextcss=#timeLeftReady!
verifyNotTitleTesting
pause11000
verifyNotTextcss=#timeLeftReady!
verifyNotTitleOnly 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.

1 comment:

  1. Hello all,
    Please 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.

    ReplyDelete