1

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

enter image description here

demouser123
  • 4,108
  • 9
  • 50
  • 82

1 Answers1

0

Open your Chrome devtools, and navigate to a tab called Properties. See the screenshot below.

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.

demouser123
  • 4,108
  • 9
  • 50
  • 82