python硒与ActiveX打开InternetExplorer

时间:2018-10-24 11:30:00

标签: python selenium

代码试用1:

driver1 = webdriver.Ie()
driver1.get(url1)
code1 = login(driver)

代码试用2:

driver = webdriver.Ie()
driver2.get(url2)
code2 = login(url2)

1 个答案:

答案 0 :(得分:0)

您是否正在寻找在python中使用硒打开IE的基本步骤

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Ie("YOUR_PATH_TO_EXE_FILE")

driver.close()