对话框处理:
from selenium import webdriver
import time
#导入谷歌浏览器的chrome_driver
chrome_driver = r"C:\python36\Lib\site-packages\selenium\webdriver\chrome\chromedriver.exe"
#打开谷歌浏览器
driver = webdriver.Chrome(executable_path=chrome_driver)
driver.get("https://www.oldboyedu.com/")
time.sleep(3)
#全屏:
driver.maximize_window()
time.sleep(3)
#查找右下角缩小框的xpath:
e = driver.find_element_by_xpath("//*[@id='iframe_company_mini_div']/h6/span[2]")
time.sleep(3)
e.click()