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[@ and @value="sign-in"]').click
time.sleep(5)
email and password typed fine but when it comes to sgin-in button nothing happend
CodePudding user response:
Try with:
driver.find_element(By.NAME , 'submit_attempt').click()
Instead of:
driver.find_element(By.XPATH , value='//button[@ and @value="sign-in"]').click
CodePudding user response:
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.