admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

waitFor Timeout Fix #501

Closed chadpaulson closed 5 years ago

chadpaulson commented 6 years ago

Referenced from issue #442.

The problem is that wait for only polls every time the asserter promise is either resolved or rejected. Imagine your promise is only resolved on fetching a value over http that takes 5 seconds but your timeout is 2 seconds - the timeout will fail to execute because it only ticks on promise resolution or rejection not time intervals (as it should be).

This revision has been used in a production-grade system since I forked the project in February. Since there have been quite a few contributions since then, I thought I would contribute back to mainline.

admc commented 5 years ago

This started a ton of tests failing, "gulp test-midway", I would love to get this change in if you have any ideas how to fix the failures.

chadpaulson commented 5 years ago

Thanks for the feedback. I will look into the failing tests and do my best to solve the issues.