0

My selenium tests are green but in Browserstack session I see some exceptions about "no such element" in log. Can't find such errors in maven/testng full logs, tried to run with -e -X parameters - the same, tests are green, no exception.

Browserstack log looks like this.

Maven log looks like this.

Krishnan Mahadevan
  • 14,121
  • 6
  • 34
  • 66
Tatiana
  • 381
  • 4
  • 18
  • What does your test code look like? Are you failing the tests when these exceptions occur? – mrfreester Aug 18 '17 at 19:28
  • No, tests are green actually. It is selenium tests with a lot of Javascript executions and Javascript asserts. It's strange that I see such exceptions only in browserstack, I tried to run exactly the same tests by exactly the same maven commands and I don't see similar exceptions in maven log. – Tatiana Aug 18 '17 at 19:42

1 Answers1

1

I had the same problem and I could see only one reason - sometimes Browserstack environments are slow and internet speed is not fast. Tests that ran for 20-30 seconds locally sometimes ran longer than a minute on BS.

So general advise for Browserstack test runs - make webdriver's implicit waits longer and in critical places add explicit waits. And do it from the same beginning of test implementation and there will not be any problems later. If cloud is fast you won't loose any second, if cloud is slow you won't get "no such element" exception.

SerhiiBond
  • 247
  • 3
  • 8