java - How to execute second test case if the first fails using selenium -


supposing code

webdriver dr = new firefoxdriver();  @test(prioity =1) {     dr.findelement(by.id("element1_id")).click(); } @test(prioity =2) {     dr.findelement(by.id("element2_id")).click(); } 

if dr.findelement(by.id("element1_id")).click(); throws exception how not stop execution of second test case afterward?

if you're using testng, can use parameter alwaysrun.

@test(priority = 1, alwaysrun = true) 

this execute method regardless of happens in other tests (or configuration methods, watch out!)


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -