Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let itWorked = true;
- let attempts = 0;
- do {
- itWorked = true;
- try {
- await this.linkThatIsCausingProblem.click();
- await this.driver.wait(until.elementIsVisible(this.elementThatWouldIndicateTheClickWorked), this.MAX_WAIT_FOR_PAGE_TO_UPDATE);
- } catch (error) {
- itWorked = false;
- await this.driver.sleep(1000);
- attempts ++;
- }
- } while (itWorked === false && attempts < 5);
Add Comment
Please, Sign In to add comment