Home > Software design >  inspect text not showing in dev tools
inspect text not showing in dev tools

Time:07-27

I am trying to automate text field using selenium, when I try to inspect the object its not showing in dev tools -text fields-

Industry : CGS-AGRIBUSINESS,

Client NAME : AB VOLVO

text name(Industry) I can see in dev tools but the text value not visible(CGS-AGRIBUSINESS), I want to verify the text ex : AB VOLVO, whether it is present or not

Properties tab

In that tab, see if there is a property called value. I think you will be able to see the text that you want to verify CGS-AGRIBUSINESS in that value.

Now to retrieve the text from the value attribute, just use the getAttribute method to get the attribute value.

Here is a rough syntax

driver.findElement(your_xpath_or_any_locator_here).getAttribute('value')

This has already been explained in this SO question.

  • Related