SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Different between "verifyText" and "assertText" in selenium

Here let me describe you main difference between assert and verify in selenium IDE software testing tool and selenium RC software testing tool. assert and verify commands are useful for verifying condition match or not.

Verify command will verify the condition and if its not match, it will give error message in Log area and will start executing next commands. while in assert command, if condition does not match then it will stop remaining script execution in selenium IDE software testing tool.

Note : Do you wants to learn more examples of selenium IDE software testing tool's commands? View this full tutorial guide.

In bellow example, you can understand difference better.

New Test
Command Target Value
open https://www.google.co.in/
verifyText css=#gb_2 > span.gbts xyz
assertText css=#gb_2 > span.gbts xyz
verifyText css=#gb_2 > span.gbts Images

Here element "css=#gb_2 > span.gbts" contains text "Images"

In this example, first "verifyText" command will go for checking that element "css=#gb_2 > span.gbts" contains text "xyz"? it
will return false because element "css=#gb_2 > span.gbts" has "Images" text but it will not stop next script execution. It will execute next command "assertText". Here is the same condition so that it will return false and due to the assert command, it will not execute next command.

View more examples on "Assert" and "Verify" related commands and tutorials in selenium IDE software testing tool.

3 comments:

  1. How to run this command in IDE,

    whether i have to past it or i have record by going to the google.com site

    ReplyDelete
    Replies
    1. you have to add new command and type it in

      Delete
  2. Select the command from the drop down box in Selenium IDE and then right click inside the web site you want to test and select either verify or assert.

    ReplyDelete