html檔案
<select id="nr" name="NR">
<option selected="">每頁顯示10條</option>
<option>每頁顯示20條</option>
<option >每頁顯示50條</option>
</select>
s = Select(driver.find_element_by_id("nr"))
s.select_by_visible_text(data.xuanze)
報錯
raise NoSuchElementException("Could not locate element with visible text: %s" % text)
這是什么原因呢
data.xuanze 是來自 data檔案下的變數xuanze,讀取資料庫的欄位, 他的文本內容就是 “每頁顯示20條”
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/218748.html
上一篇:pycharm無法創建Djanjo專案,每次只能在cmd里面通過命令創建
下一篇:python字串地址問題
