gpt4 book ai didi

python - selenium.common.exceptions.ElementClickInterceptedException : Message: element click intercepted: Element is not clickable with Selenium and Python

转载 作者:太空宇宙 更新时间:2023-11-04 06:40:04 27 4
gpt4 key购买 nike

我目前正在从事一个自动填写表格的项目。填写表格后会出现下一个按钮,这就是它给我错误的原因。

我试过:

WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH,"//input[@type='button' and @class='button']")))
Next = driver.find_element_by_xpath("//input[@type='button' and @class='button']")
Next.click()

HTML:

<span class="btn">
<input type="button" value="Next" class="button" payoneer="Button" data-controltovalidate="PersonalDetails" data-onfieldsvalidation="ToggleNextButton" data-onclick="UpdateServerWithCurrentSection();" id="PersonalDetailsButton">
</input>
<div class="clearfix"></div>
</span>

错误:

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (203, 530). Other element would receive the click: ... (Session info: chrome=76.0.3809.132)

最佳答案

如果xpath的路径是正确的,也许你可以试试这个方法来解决这个问题。用以下代码替换旧代码:

button = driver.find_element_by_xpath("xpath")
driver.execute_script("arguments[0].click();", button)

我以前解决过这个问题,但老实说,我不知道原因。

关于python - selenium.common.exceptions.ElementClickInterceptedException : Message: element click intercepted: Element is not clickable with Selenium and Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57741875/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com