Selenium through Python won't fill a field
I tried to reproduce the error here, but the script works fine
a few days ago I got very strange errors with simple things, the solution was downgrade the webdriver
I'm using chromedriver 2.25
from selenium import webdriverfrom selenium.webdriver.common.keys import Keysdriver = webdriver.Chrome(executable_path="/home/user/selenium/chromedriver2.25")url = 'http://localhost/teste.html'driver.get(url)username_field = driver.find_element_by_id('username_or_email')password_field = driver.find_element_by_id("password")username_field.send_keys("MyEmail@gmail.com")password_field.send_keys("SuperSecretPassword")password_field.send_keys(Keys.ENTER)
html:
<div class="row user "> <label for="username_or_email" tabindex="-1">Username or email</label> <input aria-required="true" autocapitalize="off" autocorrect="off" autofocus="autofocus" class="text" id="username_or_email" name="session[username_or_email]" type="text" value=""></div><div class="row password "> <label for="password" tabindex="-1">Password</label> <input aria-required="true" class="password text" id="password" name="session[password]" type="password" value=""></div>