SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

Selenium IDE "verifyNotLocation" and "assertNotLocation" Commands with examples

"verifyNotLocation" and "assertNotLocation" Commands works in opposite way of "verifyLocation" and "assertLocation" commands in selenium IDE software. All four commands are assertion commands in selenium IDE and useful for verification of current web page URL verification. Let me explain both
 commands with example for better understanding.

"verifyNotLocation" Command
"verifyNotLocation" command will fail if current page URL match with targeted URL. In bellow given example, 2nd command "" will fail and return '[error] Actual value 'https://www.google.co.in' did match 'https://www.google.co.in'' in execution log. You can use "File Logging" plugin of selenium IDE to store your test case execution log in file.

New Test
CommandTargetValue
openhttps://www.google.co.in
verifyNotLocationhttps://www.google.co.in
verifyNotLocationhttps://www.yahoo.com
assertNotLocationhttps://www.yahoo.com
assertNotLocationhttps://www.google.co.in

"assertNotLocation" Command
Same way, "assertNotLocation" command will fail if current page URL match with targeted URL and selenium IDE will stop execution. In above test case example, 5th command "assertNotLocation" will fail and return error message '[error] Actual value 'https://www.google.co.in/' did match 'https://www.google.co.in/' in execution log. You can use both commands as per your software test requirement specification.

No comments:

Post a Comment