selenium 切換標籤頁和獲取所有標籤頁信息
windows = driver.current_window_handle #定位當前頁面句柄
all_handles = driver.window_handles #獲取全部頁面句柄
for handle in all_handles: #遍歷全部頁面句柄
if handle != windows: #判斷條件
driver.switch_to.window(handle) #切換到新頁面
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章
高效率使用windows
滿天都是小xx
2024-05-06 14:15:05
如何用費曼技巧快速學習任何東西
.net's
2024-05-06 14:15:05
9大關於生產力的錯誤認知
.net's
2024-05-06 14:15:05
如何高效使用 Todoist — 完整指南
.net's
2024-05-06 14:15:05
springboot~CompletableFuture並行計算
張佔嶺
2024-05-06 14:14:35
WEB安全~X-Frame-Options
張佔嶺
2024-05-06 14:14:35
利用python爬取某殼的房產數據
阿亮
2024-05-06 14:11:44
TigerTrade
朝十晚八
2024-05-06 14:10:54
研發效能與穩定性保障
咖啡機(K.F.J)
2024-05-06 14:08:03
pipenv-基本使用手冊 解決python包版本衝突
xakoy
2024-05-06 14:07:33
web server apache tomcat11-31-websocket
葉止水
2024-05-06 14:01:42
HTML & CSS – Styling Scrollbar
興傑
2024-05-06 14:01:12
mysql導出爲excel
Coding_Yong
2024-05-06 14:00:22
英文字母,漢字,字節,位之間的關係
Coding_Yong
2024-05-06 14:00:22