Home > other >  In Selenium with Java, how can I wait for all the backend process to be completed and then execute t
In Selenium with Java, how can I wait for all the backend process to be completed and then execute t

Time:11-24

In my project there are lots of backend process running and because of which my test cases are passing sometimes and sometimes they are failing. Is there a way in Selenium where I can wait for all the backend process to be completed and then execute the next command?

CodePudding user response:

It's not really clear what you're waiting for Is this a thread? Or is it some particular action that calls elsewhere altogether

CodePudding user response:

I've generally found Selenium to be unreliable with waiting for events etc. I always find the sleeping for "enough time" is the best and most reliable approach.

I generally define "enough time" as twice the longest observed time.

Selenium tests are slow anyway. I believe making them 100% reliable at the cost of a bit more slowness is worth the trade off.

  • Related