Google chrome 通过验证码-硒

Google chrome 通过验证码-硒,google-chrome,selenium,selenium-webdriver,selenium-chromedriver,Google Chrome,Selenium,Selenium Webdriver,Selenium Chromedriver,我正在尝试使用Selenium自动化网站的登录过程。我想输入数据,然后自己输入验证码。然而,当我点击验证码时,我会看到大量的验证码和错误。有没有办法不让我遇到固定的验证码?验证码是专门为打破自动化而设计的。我会要求产品负责人添加某种cookie或机制,以使chaptcha不在那里。不幸的是,正如@Dominic所说,验证码不能被破坏。但我已经要求开发人员为测试环境包含URL参数,该参数可在测试环境中用于禁用/隐藏CAPTCH as。但如果你想调查,我听说这项服务当然要付费 以下是一些补充代码:

我正在尝试使用Selenium自动化网站的登录过程。我想输入数据,然后自己输入验证码。然而,当我点击验证码时,我会看到大量的验证码和错误。有没有办法不让我遇到固定的验证码?

验证码是专门为打破自动化而设计的。我会要求产品负责人添加某种cookie或机制,以使chaptcha不在那里。

不幸的是,正如@Dominic所说,验证码不能被破坏。但我已经要求开发人员为测试环境包含URL参数,该参数可在测试环境中用于禁用/隐藏CAPTCH as。但如果你想调查,我听说这项服务当然要付费

以下是一些补充代码:

import com.DeathByCaptcha.AccessDeniedException;
import com.DeathByCaptcha.Captcha;
import com.DeathByCaptcha.Client;
import com.DeathByCaptcha.SocketClient;
import com.DeathByCaptcha.HttpClient;

/* Put your DeathByCaptcha account username and password here.
   Use HttpClient for HTTP API. */
Client client = (Client)new SocketClient(username, password);
try {
    double balance = client.getBalance();

    /* Put your CAPTCHA file name, or file object, or arbitrary input stream,
       or an array of bytes, and optional solving timeout (in seconds) here: */
    Captcha captcha = client.decode(captchaFileName, timeout);
    if (null != captcha) {
        /* The CAPTCHA was solved; captcha.id property holds its numeric ID,
           and captcha.text holds its text. */
        System.out.println("CAPTCHA " + captcha.id + " solved: " + captcha.text);

        if (/* check if the CAPTCHA was incorrectly solved */) {
            client.report(captcha);
        }
    }
} catch (AccessDeniedException e) {
    /* Access to DBC API denied, check your credentials and/or balance */
}
这段代码没有经过测试,我只是在网上找到的,也许它会帮助你