waitForElements uses a loop with a sleep(1) to iteratively try and find elements. The sleep is done on every iteration, even the iteration that finds the elements. Therefore waitForElements will always take at least one second. With the submitted patch the sleep is skipped if the element was found, this has very notoriously improved tests run times.

Comments

daniel_hinchliff’s picture

daniel_hinchliff’s picture

Title: waitForElements does unnecessary sleeps causing severe performance issues » waitForElements does unnecessary sleeps causing tests to be very slow