看板 Python 關於我們 聯絡資訊
最近要爬蟲一個表單然後自動勾選 但最後一項有一個checkbox一直出現錯誤 求版上大師解惑 網址如下 https://cyp.gopomo.com/locations/street-artist/cultural-park/book/#viewStreetPe 最後下面的使用切結書勾選一直勾不到 F12爬蟲檢查是checkbox屬性如下 <input class="custom-control-input form-check-input" type="checkbox" id="affidavitConfirm" required=""> 我的pythom如下----------------------------------------- from selenium import webdriver from selenium.webdriver.chrome.webdriver import WebDriver import time from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as contact_name = WebDriverWait(driver, 20).until( EC.presence_of_element_located((By.NAME, "contact_name")) ) ---------------出現Name後開始執行作業----------------- agree = driver.find_element(By.ID,("affidavitConfirm")) agree.click() ---------------尋找ID為affidavitConfirm並點擊--------- 嘗試一直跳出 selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input class="custom-control-input form-check-input" type="checkbox" id="affidavitConfirm" required=""> is not clickable at point (313, 882). Other element would receive the click: <label class="custom-control-label form-check-label" for="affidavitConfirm">...</label> (Session info: chrome=112.0.5615.50) 網路爬文改了很多種方式 都沒有實際解決問題 不曉得怎麼打才是正確的 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 118.232.82.1 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1681027361.A.389.html
keepingJBJ: 丟上chatGPT ,請response python script 04/11 05:16
z6877352: 謝謝 AI科技太強了 已解決 04/11 16:49
Mahakala: 這樣也行?(驚) 04/20 12:34
s860134: 因為你是第101 問這個問題的人. 04/23 20:03
gostjoke: 可以推薦你直接用katalon錄然後導出python 那更快 05/11 18:22