from selenium import webdriver
driver = webdriver.Chrome()
driver.get("http://...")
driver.execute_script("window.open('http://...1')")
driver.execute_script("window.open('http://...2')")
driver.execute_script("window.open('http://...3')")
上述程式碼在 windows 10 可以一次多開三個分頁 (要開更多也沒問題)
可是到了 Mac,卻都只開了第一個分頁後就結束了...
請問是不是 Mac 的 webdriver 有甚麼限制??
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.241.126.43 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1598663130.A.06C.html
→
08/29 18:59,
3年前
, 1F
08/29 18:59, 1F
→
08/29 19:02,
3年前
, 2F
08/29 19:02, 2F
→
08/29 19:04,
3年前
, 3F
08/29 19:04, 3F
→
08/29 19:05,
3年前
, 4F
08/29 19:05, 4F
→
08/29 19:08,
3年前
, 5F
08/29 19:08, 5F