Issue
I am filling a input-box with verification code, but the text which can locate the input-box is keeping changing, just like "30 seconds later, you can get a new verification code". The number of seconds is keeping changing. I don't want to wait the text turn to "Youu can get a new verification code now".
How can I locate the input-box?
Thanks for your answers.
Solution
You could use a regular expression for your locator:
page.locator(text=/\d{1,2}\sseconds?\slater/i)
Answered By - Christian Baumann
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.