作者coolching (ching)
看板Python
標題[問題] selenium瀏覽器狀態
時間Tue Mar 7 22:43:59 2017
各位大大好
在下練習selenium
==========================
driver=webdriver.Chrome()
...
...
input('enter to quit')
driver.quit()
==========================
開啟一些Chrome分頁,要進行人工操作
因為操作時不能quit driver
所以用input隔開
但覺得這方法很笨(關掉瀏覽器要多按一次enter)
請問有辦法監測瀏覽器狀態嗎
使得關掉瀏覽器後接quit動作
感恩~
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 192.83.177.90
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1488897843.A.C63.html
推 ntumath: 監測?? 不想多按就用if啊? 03/08 04:02
推 Conjuror: 用 wait until expected_condition 去做 03/08 11:08
→ coolching: 謝謝大大 瞭解了! 03/08 15:34