日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

python+selenium中webdriver相关资源

發布時間:2025/3/21 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python+selenium中webdriver相关资源 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Chrome

chrome的webdriver : ?http://chromedriver.storage.googleapis.com/index.html

chrome的webdriver需要對應chrome版本下載, 不同版本之間可能會出現不兼容情況.

?

Firefox

Firefox的webdriver :?https://github.com/mozilla/geckodriver/releases/

Firefox的webdriver下載最新的即可.

?

IE

IE的webdriver : http://selenium-release.storage.googleapis.com/index.html

IE的webdriver建議下載32位驅動,64位windows系統也可使用32位驅動.? 不推薦64位驅動的原因在于, 已知bug中, 在對網頁元素輸入字符串時速度極慢,如用下列代碼時, 第13行鍵入字符串時, fengh.ssc需要耗時10秒.

1 def login(name='fengh.ssc', password='bob0.0.8'): 2 '''登錄fss系統''' 3 global gl_driver 4 gl_driver = webdriver.Firefox() 5 gl_driver.maximize_window() 6 gl_driver.get("http://fss.sinopec.com") 7 if "財務共享自助服務" in gl_driver.title: 8 system = gl_driver.find_element_by_id('systemId') 9 system.click() 10 system.send_keys(Keys.PAGE_UP, Keys.ENTER) 11 user = gl_driver.find_element_by_name("loginnamesrc") 12 user.clear() 13 user.send_keys(name, Keys.TAB, password, Keys.ENTER) 14 # password = gl_driver.find_element_by_name('passwordsrc')#passwordsrc命名重復,無法定位 15 else: 16 print("請檢查網絡是否正常")

?

?

?

?

?

轉載于:https://www.cnblogs.com/feng-hao/p/10823496.html

《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀

總結

以上是生活随笔為你收集整理的python+selenium中webdriver相关资源的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。