[問題] 關鍵字條件已刪文
使用Selenium開啟瀏覽器,並輸入帳號密碼、進入頁面
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
webdriver_path = '網址'
options = Options()
driver = webdriver.Chrome(executable_path=webdriver_path, options=options)
driver.get("https://www.quicktranslate.com/login/") #前往這個網址
driver.find_element_by_id('Id').send_keys('帳號') #輸入帳號
driver.find_element_by_id('Pass').send_keys('密碼') #輸入密碼
driver.find_element_by_id('btn-login').click() #點擊確認
===
不好意思
如果我想在進入頁面後,在特定欄位(已撈到)中,設定數個關鍵字做為條件
並固定幾秒後網頁重整,如果有出現符合關鍵字條件
就執行電腦中的exe執行檔
請問以上需求,語法要怎麼補才好呢?
可以麻煩指點一下嗎
謝謝Orz
--
自分を幸せにできるのは自分だけだから。
楽しくなければ生きている意味が無いし!
╭/\☆────/\╮ ╭/\─────/\╮│ │ │ \ / │
│ 喵 喵 │ │ 喵 喵 │
│○ ╰───╯ ○│ │〃 ╰┬┬┬╯ 〃│ │ │ ╰─╯ │
╰─┬O───O┬─╯ ╰─┬○───○┬─╯
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.36.94.35 (臺灣)
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1591349061.A.2A4.html
→
06/05 20:22,
5年前
, 1F
06/05 20:22, 1F
→
06/05 20:22,
5年前
, 2F
06/05 20:22, 2F
推
06/05 20:25,
5年前
, 3F
06/05 20:25, 3F
→
06/05 20:26,
5年前
, 4F
06/05 20:26, 4F
謝謝 那如果我想在元素位置中,搜尋關鍵字的話
driver.find_elements_by_id("table-orders") ???
後面語法要如何下才好呢?
※ 編輯: ayaniji (36.230.115.111 臺灣), 06/07/2020 14:29:47
Python 近期熱門文章
PTT數位生活區 即時熱門文章