Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.7k points)

I enter a value in TextBox or a Combobox and would like to retrieve the value I have just entered. I see that the Selenium Weblement method 'getText()' doesn't retrieve the value, it seems the entered text doesn't get pushed into DOM.

Any Solutions?

1 Answer

0 votes
by (62.9k points)

Try getValue if it is a Text Field or Dropdown box

String lastname=selenium.getValue("//*[@id='lastName']");


Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.1k users

Browse Categories