In a html page I have the following snippet:
<div class="jupyter-widgets widget-hbox widget-text">
<div class="widget-label" style="display: block;">Walltime:</div>
<input type="text" class="form-control" placeholder="">
</div>
in which the input element renders, like expected, as an input field. However, this input field has some value in it.
Using the inspector of the browser it is possible to select that element and use the following expression in the console to get that value:
$0.value
However, how to do this in python-selenium?
When I have the input element in a variable named 'input' I have tried the following:
driver.execute_script("arguments[0].value;", element)
which does not return the value in that input box, but None instead. How to do it correctly to retrieve the value from that 'input' box?
element.text?