Skip to content
Advertisement

Selenium how to get hidden value inside html which is not showing in the html element

I working on one site where I found an input field value like

enter image description here

Here value Hotel rupdia is coming automatically from Database. But when I inspect the element I have found not set any value. And I am not sure how can read this text from here using selenium. As value not stored in any attribute or value

Here is the Html

JavaScript

Can anyone face this type of issue? And help me to find out the solution?

Advertisement

Answer

Use this xpath

JavaScript

as

JavaScript

and print this val, Also remember to put some sleep before using this code.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement