0

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

1
  • You mention The element is not recognized. Are you seeing some error indicating there is no such element? Or is the error you get that dane was not found as the text?
    – mrfreester
    May 14, 2019 at 21:02

1 Answer 1

1

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.

1
  • I dont have the html like that since the project is in angular. But I think the problem is with the input as you mentioned. "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:" This is the problem here. So I will accept the answer
    – Syrus
    May 15, 2019 at 4:01

Your Answer

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

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