【发布时间】:2020-03-06 00:55:44
【问题描述】:
我找不到用硒按下按钮的方法。试图按名称和xpath单击它,但没有用。 这是此网站上的登录按钮 - https://account.envato.com/sign_in?to=audiojungle
这是按钮的代码:
<input type="submit" name="commit" value="Sign in to your account" class="js-sign-in__submit e-btn--3d -color-primary -size-m -width-full h-mb2 h-mt1">
如果我尝试通过 x 路径找到它,使用 - driver.find_element_by_xpath('//*[@id="sign-in-form"]/div[6]/input').click()
或使用 - driver.find_element_by_name('commit').click()
它带来了这个问题-
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input type="submit" name="commit" value="Sign In"formnovalidate="formnovalidate" data-disable-with="Sign In"> is not clickable at point (789, 309). Other element would receive the click: <p style="">...</p>
我不记得我尝试过的所有事情,但我希望你能理解我。我在互联网上没有找到解决方案,所以我希望你能帮助我,谢谢)
【问题讨论】:
-
你能分享你剩下的代码吗?这将帮助我们弄清楚正在发生的事情以及如何最好地提供帮助。
-
嗨,Alex,看起来你有异步加载的东西,我假设你在提交之前在该表单中做了其他事情,这会导致问题。
标签: python selenium selenium-webdriver button