Verify and Assert functions does not work as expected in Selenium IDE?



  • I'm using Selenium IDE to record steps. Web system has developed using Angular.js
    I tried to use verify text and assert text functions through IDE. For target elements, xpath is given. Same xpath is used to fill data into the field. But when try to assert or verify, the element is not recognized. How should I fix this?

    Selenium IDE image



  • If you have some html like this:

    <div id="someID">some text</div>
    

    Then calling verify text with Value == some text for xpath=//div[@id='someID'] will confirm that the text is some text

    If you are filling out an input, usually the html DOES NOT immediately or ever(unless there is some script to update the html) look like this:

    <input id="someID">the text you just typed</input>
    

    Rather it just looks like this:

    <input id="someID"></input> //notice no text in there <<< 
    

    So what do you do instead?

    You can check the html to see if that value is stored somewhere on the element as an attribute or somewhere else to verify against...

    But more likely for a meaningful test, you just want to submit that text, and verify that value ends up where it's supposed to after you submit it.



Suggested Topics

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