[英]Using Selenium for clicking on button Python
當我在Selenium中單擊此按鈕時,出現錯誤告訴我:
Element is not clickable at point(245, 19)
按鈕元素
input type="submit" id="login_submit" name="login_submit" class="red-button" value="Login"
我嘗試了幾種方法,
driver.find_element_by_id("login_submit");
和
driver.find_element_by_xpath('//input[@type="submit" and @name="login_submit"]');
我正在使用firefox作為驅動程序
奇怪的是,它實際上只能工作一次,然后由於某種原因(通常在重新啟動后就可以工作)而停止工作,我不知道為什么要這樣做。
不知道如果用指針突出顯示按鈕的圖像是否發生變化是否重要。
感謝您提供的任何幫助
您是否從其他線程簽出了此答案? “調試“元素在點處不可單擊”錯誤”
https://stackoverflow.com/a/19763087/4428117
問題在於, 單擊按鈕不可見,或者在單擊元素之前刷新頁面。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.