I want to automate my opening session so, following some tutorials and other questions on Stackoverflow, I did the following :
import selenium
from selenium import webdriver
driver = webdriver.Safari()
driver.get('https://www.codeur.com/users/sign_in')
id_box = driver.find_element_by_name('user_email')
id_box.send_keys(my_mail)
# Find password box
pass_box = driver.find_element_by_name('user_password')
# Send password
pass_box.send_keys(my_password)
# Find login button
login_button = driver.find_element_by_name('commit')
# Click login
login_button.click()
I get the following error :
line 321, in execute
self.error_handler.check_response(response)
line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message:
Process finished with exit code 1
Is it because I missed the right name to the submit button?
The html corresponding, I think, would be :
<span class="recaptcha-button-enabled">
<input type="submit" name="commit" value="Se connecter" class="btn btn-primary btn-lg btn-block" data-disable-with="Se connecter">
</span>
<span class="recaptcha-button-disabled" style="display: none">
<input type="submit" name="commit" value="Connexion en cours…" class="btn btn-primary btn-lg btn-block" disabled="disabled" data-disable-with="Connexion en cours…">
</span>
