I recorded a test where I am trying to create a new item and save it and then trying to verify that the item is present on that page. I used a random generator to generate the name of the item. The random name is generated successfully but after it has been generated, I want to validate that the name generated is present on that page.
Here is what my test looks like:
When I run this test, it fails at the last step with this message:
Action failed using following locators:
- XPATH=//strong[. = ’ Mildrid Bagnold ']
Element is present
When I download the DOM of the failed test and search for this name, it is displayed on that DOM. I also tried doing the same test with an existing item on the page and it works fine and it has the same XPATH for that item, it is only having trouble when I am creating the item with a random generator. Can you please suggest some solution for it?