Ankit
Ankit

Reputation: 199

Not able to retrieve text from the textbox using webdriver

I am automating one of our client website, in there is one textbox, i just need to verify the whether the textbox is editable or not. For that, i am clicking on the textbox, entering the random string and again retrieving the text entered to check if same text is written or not.

I am successfully able to find, click and write in the textbox but when i retrieve the text it always return blank (or ""). Can you guys please tell me what the issue may be?

Text Box description

Upvotes: 1

Views: 409

Answers (1)

Arpan Buch
Arpan Buch

Reputation: 1400

Probably you can try this :

 findElement(By.id("someid")).getAttribute("value");

Upvotes: 2

Related Questions