Login to etsy with selenium python

Question:

i have problem with login to etsy with selenium
this is my script


import time
import undetected_chromedriver as uc
from selenium.webdriver.common.by import By

site="https://www.etsy.com/signin"
email = "[email protected]"
password = "password"

options = uc.ChromeOptions()
driver = uc.Chrome(options=options)
driver.get(site)
email = driver.find_element(by=By.ID , value="join_neu_email_field")
email.send_keys(email)
passwordBOX = driver.find_element(by=By.ID , value="join_neu_password_field")
passwordBOX.send_keys(password)
driver.find_element(By.XPATH , value='//button[@class="btn btn-large width-full btn-primary" and @value="sign-in"]').click
time.sleep(5)

email and password typed fine but when it comes to sgin-in button nothing happend

Asked By: jame the spear

||

Answers:

Try with:

driver.find_element(By.NAME , 'submit_attempt').click()

Instead of:

driver.find_element(By.XPATH , value='//button[@class="btn btn-large width-full btn-primary" and @value="sign-in"]').click
Answered By: Jaky Ruby

Your xpath seems wrong, class name changed.Try with below xpath

driver.find_element(By.XPATH , value='//button[@name="submit_attempt" and @value="sign-in"]').click()

click() is method not a property. you missed that as well.

Answered By: KunduK