简体   繁体   English

如何使用 selenium C# 单击按钮重新验证

[英]How to Click on the button recaptcha using selenium C#

I need help,I try do click on the recaptcha with selenium on C#, But It not working, I can't found by Xpath the element我需要帮助,我尝试在 C# 上使用 selenium 单击 recaptcha,但它不起作用,我无法通过 Xpath 找到该元素

ChromeDriver driver;
driver.FindElement(By.Id("recaptcha-reload-button")).Click();

it's the div but I don't have the xpath I need do click on this这是 div 但我没有 xpath我需要点击这个

Just a suggestion on this, the idea behind reCaptcha is to prevent bot activities on the site.只是对此的建议,reCaptcha 背后的想法是防止网站上的机器人活动。 What ever you do with selenium is kind of bot activity.你对硒所做的一切都是一种机器人活动。 I would suggest to disable reCaptcha(if possible) in the lower environments and perform automation testing.我建议在较低的环境中禁用 reCaptcha(如果可能)并执行自动化测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM