Find Text on web page without Xpath or any Locator | Selenium Training|Java|WebDriver|TestNG|Frameworks|Videos
30% Mid August Discount Avail now

Selenium Training Forum

Find Text on web page without Xpath or any Locator

M
Post on 16/09/2015

Hi Guys,
I have to look a text on web page after logged into it.
It depends upon access role. If I login as an admin then I can see that text.
But if I login as an normal user then I can not see that text. How can I sure when I logged as an admin the text is there and as a normal user text is not there. But text is always in source code of the page. When I search by getting source code of page every time it passes. Giving message text is there. But on front end when normal user logged in the text is not there.

But one thing this text is in a frame on the page not on normal page.

Please anybody tell me about this scenario. If you require further description please let me know.

Cheers,
Waqar Ali

M
Reply on 17/09/2015

could you please be little more clear on what does that page has send a screen shot of web page you want to get text from.

M
Reply on 17/09/2015

Hi,
Here is screen shot. When I logged in as an Admin, Then I got both text fields.
But I logged in as a normal User Then I don't get Medical Text field. Please let me know how I can make sure after login is there medical Text field or not as a normal user.

M
Reply on 18/09/2015

[quote:2eccu33a] Please let me know how I can make sure after login is there medical Text field or not as a normal user.[/quote:2eccu33a]

so you want to verify the "medical"

for that you can use is element present. its explained n the videos.