作者kiey (炼)
看板Python
标题[问题] 用selenium 控制已开启的IE浏览器
时间Thu Oct 22 17:16:19 2020
想请问一下版上先进们
chrome 可以用
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
chrome_options = Options()
chrome_options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
chrome_driver = "C:\Program Files
(x86)\Google\Chrome\Application\chromedriver.exe"
driver = webdriver.Chrome(chrome_driver, chrome_options=chrome_options)
print(driver.title)
这种方式 开启 已开启的 chrome 浏览器
想请问 IE 是否也有类似的方法可以使用呢?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 114.47.140.253 (台湾)
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1603358182.A.B9F.html
2F:推 stillcolor: 用法类似啊,下载browser driver,给driver路径 10/22 17:57
3F:→ stillcolor: 只是刚刚看一下IE好像还有一些设定要打开?没用过IE 10/22 17:57
4F:→ kiey: 我研究看看 谢谢你 10/22 18:17
5F:推 TakiDog: 为什麽要折磨自己XD 10/23 10:15
6F:→ ddavid: 这做法不好吧,你这样在不同电脑上就可能失败 10/23 13:57
7F:→ ddavid: 当有些人用某些方式改变安装路径,这就挂掉了 10/23 13:58
8F:推 ddavid: 当然如果没有给别人用的需求是没差啦XD 10/23 14:00
9F:→ s860134: Ie 要修改安全性,不过 edge 之後面就走 chromiun 几乎和 10/25 17:26
10F:→ s860134: chrome 没差 10/25 17:26