How I can verify Text is present or not in robot framework?



  • 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=
    


  • 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
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2