How to validate text in webpage?

It looks easy question but unfortunately searching from 2 days but no luck.

My requirement is quite simple:
Login to a website using an user which was mentioned in excel.
After login, I could able to see the logged in user in website top panel.
How do I validate that the same user logged which was there in excel ?

PS: Only one value and validation.

Hi @Rajendra_K
Welcome to the community forum!

Could you post a screenshot of the website?

If user name is shown at the top panel, you can use Get Text activity to scrape it off and compare with If activity.

1 Like

Hey @Rajendra_K,

You can use the get visible text activity to get the text from the top panel and then you can match it against the value from the excel.

You can also use the Find Element which will return the UiElement as output then use the getattribute activity with the attribute name you want to extract.

ex: get attribute(“name”),get attribute(“id”) ,get attribute(“innerText”)

You can also use the gettext activity.

1 Like

Apologies for the delay in response.
Thanks everyone and I could able to verify one text using if condition.
But how feasible to do validations in a website, like how we test web testing.

Example: Open a browser, validate / verify logo, the login, password boxes and data and login to the website, validate the user logged in and other headers.

1 Like