日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python+selenium中webdriver相关资源

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

Chrome

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

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

?

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系統(tǒng)也可使用32位驅動.? 不推薦64位驅動的原因在于, 已知bug中, 在對網(wǎng)頁元素輸入字符串時速度極慢,如用下列代碼時, 第13行鍵入字符串時, fengh.ssc需要耗時10秒.

1 def login(name='fengh.ssc', password='bob0.0.8'): 2 '''登錄fss系統(tǒng)''' 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("請檢查網(wǎng)絡是否正常")

?

?

?

?

?

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

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

總結

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

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