[問題] 用selenium 控制已開啟的IE瀏覽器

看板Python作者 (煉)時間3年前 (2020/10/22 17:16), 編輯推噓3(307)
留言10則, 5人參與, 3年前最新討論串1/1
想請問一下版上先進們 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://www.ptt.cc/bbs/Python/M.1603358182.A.B9F.html

10/22 17:51, 3年前 , 1F

10/22 17:57, 3年前 , 2F
用法類似啊,下載browser driver,給driver路徑
10/22 17:57, 2F

10/22 17:57, 3年前 , 3F
只是剛剛看一下IE好像還有一些設定要打開?沒用過IE
10/22 17:57, 3F

10/22 18:17, 3年前 , 4F
我研究看看 謝謝你
10/22 18:17, 4F

10/23 10:15, 3年前 , 5F
為什麼要折磨自己XD
10/23 10:15, 5F

10/23 13:57, 3年前 , 6F
這做法不好吧,你這樣在不同電腦上就可能失敗
10/23 13:57, 6F

10/23 13:58, 3年前 , 7F
當有些人用某些方式改變安裝路徑,這就掛掉了
10/23 13:58, 7F

10/23 14:00, 3年前 , 8F
當然如果沒有給別人用的需求是沒差啦XD
10/23 14:00, 8F

10/25 17:26, 3年前 , 9F
Ie 要修改安全性,不過 edge 之後面就走 chromiun 幾乎和
10/25 17:26, 9F

10/25 17:26, 3年前 , 10F
chrome 沒差
10/25 17:26, 10F
文章代碼(AID): #1VaKtckV (Python)