-2

I have a short Selenium IDE test that just checks the titles of some web pages, 4 links that's it.

And in selenium IDE if one of the title checks fails it will continue, and alert in the log about the failure. Where as in Selenium-side-runner the test just fails and stops the moment it hit the failure and does not continue. Is there an argument I can pass so that the execution continues even after failure?

I tried looking up the argument, but couldn't find any info.

supputuri
  • 13,644
  • 2
  • 21
  • 39
Sherpa11
  • 153
  • 1
  • 1
  • 14
  • Welcome to stackoverflow, ( read how to properly form a question ) I would like to help you, but there is nothing what I look at, would you mind to show us some code / add some pictures to show us what have you tried ? – StyleZ Sep 11 '19 at 21:06
  • try to look at this – StyleZ Sep 11 '19 at 21:07
  • please provide a sample of your code. – DMart Sep 12 '19 at 16:12

1 Answers1

0

I assume you're using Asserts? Something like this:

driver.get(url1)
AssertEquals (webElement1.title, "expected title 1")
driver.get(url2)
AssertEquals (webElement2.title, "expected title 2")

You could do this a couple of ways: By eliminationg the asserts, tracking your checks and checking at the end of the test for errors:

errors = 0; 
driver.get(url1)
if (webElement1.title != "expected title 1") { errors++;}
driver.get(url2)
if(webElement2.title != "expected title 2")  { errors++;}
Assert.equals (errors, 0)

of you could use soft assertions. Which depending on the framework you're using, the usage differs. One such usage: https://www.petrikainulainen.net/programming/testing/junit-5-tutorial-writing-assertions-with-assertj/

DMart
  • 2,401
  • 1
  • 14
  • 19