小编VRX*_*VRX的帖子

selenium.common.exceptions.ElementClickInterceptedException:消息:元素点击被拦截:元素无法用Selenium和Python点击

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

我试过了:

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()
Run Code Online (Sandbox Code Playgroud)

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>
Run Code Online (Sandbox Code Playgroud)

错误:

selenium.common.exceptions.ElementClickInterceptedException:消息:元素点击被拦截:元素在点 (203, 530) 处不可点击。其他元素将收到点击:...(会话信息:chrome=76.0.3809.132)

python selenium xpath css-selectors webdriverwait

12
推荐指数
3
解决办法
3万
查看次数

标签 统计

css-selectors ×1

python ×1

selenium ×1

webdriverwait ×1

xpath ×1