I am trying to use the following syntax but can anyone tell me how I can use this as an example?

Element Should Contain locator, expected, message=

2 Answers 2


Suppose you are expecting a particular locator to get value as "Payment was successful", so firstly store that in temp variable "response" and finds its value by "Get Text" and then compare it.

 ${response}    Get Text    xpath=/html/body/div/tr[2]/td/strong
 Should Be Equal As Strings    ${response}    Payment was successful

Use this keyword

Element Text Should Be

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.