Fixes #279 - Retry runner.click()
The fix here changes several things:
- I could trace down the crash on Chromium dev (v105) during the
driver.executeAsyncScript
call. Replacing it withdriver.executeScript
changed the behaviour from always failing to flaky failing. Therefore, I considered that change an improvement. - After updating
selenium-webdriver
andmocha
packages to their latest versions the amount of flakiness was reduced even more, but still occasionally failing. - To deal with the remaining failures I added a retrying mechanism to two places. The first one is
test/runner.js
, wheredriver.executeScript()
is retried in the event of getting thereceived Inspector.detached event
webdriver error. The second place istest/subscribe-links.js
, whererunner.click()
is retried if the fake listener wasn't called, assuming that was caused by the webdriver error. If that wouldn't be the cause, the test would eventually fail anyway.
For reference, that fix is needed for the testing code only. The original subscribe link functionality works well on Chromium v105 (manually tested), therefore no changes are required to the /sdk/
code.
Edited by Toni Feliu