I know that both of them can be used to validate if an element appears on the page but I was wondering about the performance impact and readability implications of each. So my question is, suppose you have 20 elements to check in the page,
OR
Yes, factually both of them can be used to validate if an element appears on the page but ofcoarse you can design your tests for a much better performance.
Ideally, the Waits should be implemented strictly as per your Usecase and Test Steps.
Using Wait Until Element Is Visible
: If your usecase involves visibility of all the 20 elements, albeit Wait Until Element Is Visible is the best fit.
Using Wait Until Element Is Visible
for header text AND then use Element Should Be Visible
: If your usecase involves visibility of any element, inducing Wait Until Element Is Visible for header text
would be a complete overhead. As you have no validation with the header text, this step isn't necessary. Rather you should directly induce Wait for the visibility of the desired element(s).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With