我不知道如何解决此问题。我认为按钮可能是不可点击的。
import time
import traceback
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
from bs4 import BeautifulSoup
d = webdriver.Chrome('./chromedriver')
d.implicitly_wait(2)
url ='http://www.juso.go.kr/support/AddressMainSearch.do?searchType=TOTAL'
add_data = "경기도 화성시 동탄원천로"
try:
d.get(url)
elem = d.find_element_by_class_name('box_search')
elem.click()
elem.send_keys(add_data)
time.sleep(1)
elem = d.find_element_by_class_name("btn_search searchBtn")
elem.click()