In Page Object Model with Pagefactory Where to use softAssertassertall | Selenium Forum
S
suhail.itm Posted on 11/02/2019

I made a custom function in BasePage class for reportFailure() . i take screenShot inside the function and fail the test like test.log(Status.Fail, message) .

guide me where to use softAssert.assertall() .


A
Ashish Thakur Replied on 12/02/2019

You can use it at after test annotation.


S
suhail.itm Replied on 14/02/2019

Hi Ashish ,

i have a confusion , some time i need to immediately stop the execution and sometime i do not stop the execution . if i use softassert.assertall() at @AfterTest annotation i will stop the execution at end . pls suggest .

and what if iwe want to use the softassert in Pages Class .

 


A
Ashish Thakur Replied on 20/02/2019

After Test executes only after the test is done executing., in case you want to stop the execution immediately, you can use Assert.fail()