Log in with Python. Button click error

Asked 2 years ago, Updated 2 years ago, 48 views

import openpyxl
from selenium import webdriver
from bs4 import BeautifulSoup
from selenium.webdriver.chrome.options import Options
wb = openpyxl.Workbook()
chrome_options = Options()

options = webdriver.ChromeOptions()
#options.add_argument('headless')
options.add_argument('window-size=1920x1080')
options.add_argument("disable-gpu")

sheet = wb.active
sheet.append(["1lable", "2lable"])
wb.save ("Filmakers").xlsx")
path = "/Users/KimJinwoo/Desktop/Tools/Python Workspace./chromedriver 2"

driver = webdriver.Chrome(path , chrome_options=options)


driver.get('https://otr.co.kr/#!')

driver.find_element_by_name('log').send_keys ('ID')
driver.find_element_by_name('pwd').send_keys ('password')
#driver.find_element_by_class_name('btn btn-lg btn-primary full-width').click()
driver.find_element_by_css_selector('#login-panel-5664 > form > div > div > button').click()

You can enter your ID password I can't click on the login window. I ask for your help me.

python crawling

2022-09-20 14:32

1 Answers

Try the following:

driver.find_element_by_class_name('btn').click()


2022-09-20 14:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.