Using Selenium for .NET, how can I get the current value from a html input?
It's possible to .GetAttribute()
to get the value
attribute but this is the html attribute rather than the current value entered into the text box; an approach similar to jQuery's .val()
rather than jQuery's .attr()
.
Element.Text
didn't work for me. I used element.GetAttribute("value")
Check out this Q&A Setting input textbox text and then retrieving it in Specflow & Selenium
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With