Removed sleep 10s in login method, changed it to loop which waiting field#984
Removed sleep 10s in login method, changed it to loop which waiting field#984
Conversation
| this.changeLanguage(); | ||
| this.gmailLogin(email, password); | ||
| this.signInAsGoogleAccounLabel.waitForDisplayed({reverse: true}); | ||
| this.signInAsGoogleAccounLabel.waitForDisplayed({timeout: 10000, reverse: true}); |
There was a problem hiding this comment.
If various different screens are being switched on the way, you may need to try/wait/retry as I suggested to avoid the flakiness.
|
@tomholub finished with this task, run tests and no error (4/4) |
| do { | ||
| browser.pause(1000); | ||
| count++; | ||
| } while(this.enterPassPhraseField.isDisplayed() !== true || count <= 15); |
There was a problem hiding this comment.
I don't think this does what you think it does. It looks to me it will try 15 times regardless if it showed before or not. Have you tested how many iterations it does?
There was a problem hiding this comment.
@tomholubno, we have "||", it is checking one of arguments is true, if the filed is displayed on 5th iteration, we break from loop, but if the field is not displayed after 15 iterations we finish loop and go to next step
I will check how many iterations appear
There was a problem hiding this comment.
@tomholub sorry, You was right, I changed || to &&
There was a problem hiding this comment.
@tomholub checked iterations count
we have max 3 iterations

This PR contains changes for login method, removed sleep 10s, added waitForDispalayed({reverse: true})
close #825
Tests
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):