Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
Archana
Archana
Regular Participant
Regular Participant
Posts : 33
Join date : 2009-08-21

Stop the current test case if any line fails. Empty Stop the current test case if any line fails.

Sat Sep 05, 2009 2:45 pm
Hi,
In my test case, there are many assertions, if one is failed, I don't want to execute remaining lines of this test case. How can I?

In selenium RC PHP, I'm using markTestSkipped with some msg, but not working fine
if($sal < 0)
{
$this->markTestSkipped( 'This test is skipped since one salary is negative');
}
When I run this testcase, Test is skipped, but msg is not appearing. Can we do this with selenium IDE commands?
Advisor
Advisor
------------------------
------------------------
Posts : 387
Join date : 2009-07-30
Location : India
https://seleniumforum.forumotion.net

Stop the current test case if any line fails. Empty Re: Stop the current test case if any line fails.

Mon Sep 07, 2009 10:47 am
hi,

I think assert will automatically abort the test, if it fails. Thats the motive of assetion in selenium . read this to get a clear picture:

All Selenium Assertions can be used in 3 modes: "assert", "verify", and
"waitFor". For example, you can "assertText", "verifyText" and
"waitForText". When an "assert" fails, the test is aborted. When a
"verify" fails, the test will continue execution, logging the failure.
This allows a single "assert" to ensure that the application is on the
correct page, followed by a bunch of "verify" assertions to test form
field values, labels, etc.


You can also use the following command to end the whole process if any assertion fails

close()
Simulates the user clicking the "close" button in the titlebar of a popup window or tab.

Hope this will help you.
bye

Back to top
Permissions in this forum:
You cannot reply to topics in this forum