id = '아이디'
passwd = '비밀번호'
 
// 아이디 비번 입력창에 입력
driver.find_element(By.XPATH,'//*[@id="userId"]').send_keys(id)
driver.find_element(By.XPATH,'//*[@id="article"]/div[2]/div/form/div/div[1]/fieldset/div[1]/input[2]').send_keys(passwd)

 

// 로그인 버튼 클릭
driver.find_element(By.XPATH, '//*[@id="article"]/div[2]/div/form/div/div[1]/fieldset/div[1]/a' ).click()

 

find_element_by_xpath 가 되지 않아 

from selenium.webdriver.common.by import By
 
driver.find_element(By.XPATH,'//*[@id="userId"]').send_keys(id)

이런식으로 사용하였다. 

+ Recent posts