How do you get input value if value already exists as an attribute in Selenium?
<p>I am trying to get the value of a user input in selenium webdriver, however, the webdriver is returning the text from the 'value' attribute instead. Is this a bug in Selenium? How can I get what the user actually entered?</p>

<pre><code>&lt;input id="budget" name="budget" type="text" size="10" maxlength="10" class="exemplifiable" value="100" data-example="20.00"&gt;
</code></pre>

<p><strong>Test Code</strong></p>

<pre><code>locator = 'budget'
element = self.find_element_by_id(locator)
element.send_keys('5') 
value = element.get_attribute('value')
print(value)     
# prints 100 instead of 5
</code></pre>

<p>Try to execute JavaScript code:</p>

<pre><code>driver.execute_script("document.getElementById('id_value').value")
</code></pre>

python selenium-webdriver