Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Stop the current test case if any line fails.

View previous topic View next topic Go down

Stop the current test case if any line fails.

Post by Archana on 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?
avatar
Archana
Regular Participant
Regular Participant

Posts : 33
Join date : 2009-08-21

Back to top Go down

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

Post by Adviser on 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


_________________
Spread Your Knowledge About Selenium Tool.

Administrator
Email: selenium.discussion.thread@live.com
Forum: http://seleniumforum.forumotion.net
avatar
Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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