Search code examples
seleniumrobotframework

How to wait until page contains 1 of the two predefined elements in Selenium Robot Framework?


Is there a way to wait until Web page contains 1 of the two elements in Selenium Library.

I tried the following code but clearly it does not work:

Wait Until Page Contains    user is registered    Or    user already existed

Any help is really appreciated.


Solution

  • Did you try to use the Wait For Condition keyword?

    Please note that you must give it a javascript expression (in your case it suppose to be document.body.innerText).