I enter a value in TextBox or a Combobox, and would like to retrieve the value I have just entered. I see that Selenium Weblement method 'getText()' doesnt retrieve the value, it seems the entered text doesn't get pushed into DOM.
Any Solutions ?
I enter a value in TextBox or a Combobox, and would like to retrieve the value I have just entered. I see that Selenium Weblement method 'getText()' doesnt retrieve the value, it seems the entered text doesn't get pushed into DOM.
Any Solutions ?
Try
getValue
if it is a Text Field or Dropdown boxThe
getText()
method is for retrieving a text node between element tags for example:getText()
will return "Something"In a textbox typed text goes into the value attribute so you can try something like:
ComboBox
is a bit different. But if you're using theSelect
object you can use the method: