【发布时间】:2021-05-17 04:10:15
【问题描述】:
无法在 python selenium 中提交验证码文本字段
大家好, 我想提交一个填写了验证码的文本字段,但我无法提交。
这是错误:
Exception has occurred: NoSuchElementException
Message: Unable to locate element: ./ancestor-or-self::form
这是我的脚本(它可以在其他网页上完美运行):
sub = driver.find_element_by_class_name("g-recaptcha-response")
sub.submit()
也尝试了很多其他的东西,但没有任何效果。
这里是 HTML 代码: enter image description here Textfield 是整个底部的那个。
如果有人可以帮助我,我会很高兴。谢谢你的时间!
Ps:这是我的第一个问题,很抱歉,如果我做错了什么。而且我不是来自美国或英国,所以我的英语有点糟糕......
【问题讨论】:
标签: python selenium submit recaptcha captcha