[問題] Selenium 用 Select 選出下拉選單
https://imgur.com/a/ALoXGnR // 像是這樣下拉選單
下面程式碼我想選擇第7個頻道
select = Select(driver.find_element_by_name("channel_24"))
select.select_by_visible_text("7")
for op in select.options:
print(op.text)
我程式碼印出來的下單選單都是空的~
錯誤:
selenium.common.exceptions.ElementNotVisibleException: Message: element not
visible: Element is not currently visible and may not be manipulated
下面網址是我要用Select 讀取的 html 跟 下面是完整的錯誤訊息
https://gist.github.com/shihyu/d41512962cb35dea2dd8c369bdb0154b
因為我試過很多方式都無法選擇要的欄位
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 175.181.253.178
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1524461833.A.478.html
推
04/24 17:59,
7年前
, 1F
04/24 17:59, 1F
→
04/24 23:26,
7年前
, 2F
04/24 23:26, 2F
→
04/24 23:27,
7年前
, 3F
04/24 23:27, 3F
推
04/25 14:51,
7年前
, 4F
04/25 14:51, 4F
推
04/25 22:59,
7年前
, 5F
04/25 22:59, 5F
→
04/25 23:36,
7年前
, 6F
04/25 23:36, 6F
→
04/25 23:45,
7年前
, 7F
04/25 23:45, 7F
→
04/25 23:45,
7年前
, 8F
04/25 23:45, 8F
Python 近期熱門文章
PTT數位生活區 即時熱門文章