【发布时间】:2020-03-31 19:26:50
【问题描述】:
我正在尝试编写单击此网络验证码的按钮的代码,我需要什么代码才能按下它? 网址:https://www.google.com/recaptcha/api2/demo
我试过了:
//Driver.Manage().Timeouts().ImplicitWait(80, TimeUnit.SECONDS);
IWebElement iframeSwitch =
Driver.FindElement(By.XPath("/html/body/section/div/div/section/div/article/div/div[2]/form/table/tbody/tr/td[1]/div/div/div/iframe"));
Driver.SwitchTo().Frame(iframeSwitch);
Driver.FindElement(By.CssSelector("div[class=recaptcha-checkbox-checkmark]")).Click();
【问题讨论】:
-
您是否要在 recaptcha 中选中复选标记?