我試圖自動購買筆記本電腦,但當我嘗試輸入信用卡號時,它給出了錯誤,selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate我使用 Xpath 順便說一句。
2 回答

catspeake
TA貢獻1111條經驗 獲得超0個贊
所以如果你的元素是
<input type="tel" id="pp-1DUIVO-14" autocomplete="off" name="addCreditCardNumber" class="a-input-text a-form-normal">
你可以使用點擊它
my_input = driver.find_element_by_css_selector('input[id="pp-1DUIVO-14"]') my_input .click()
添加回答
舉報
0/150
提交
取消