selenium打开chrome浏览器时,地址栏下方会出现该提示“Chrome正在受到自动测试软件的控制”

Selenium——去掉Chrome正受到自动软件测试的控制

public class BasicDriver {
    public WebDriver driver;
    @BeforeClass
    public void setUp(){
        ChromeOptions options = new ChromeOptions();
        options.addArguments("disable-infobars");
        driver = new ChromeDriver(options);
        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
        driver.manage().window().maximize();
    }

    @Test
    public void test(){
        driver.get("http://www.baidu.com");
    }
}

  再次打开chrome该提示会消失

相关文章:

  • 2022-02-15
  • 2021-09-07
  • 2019-12-12
  • 2022-02-03
  • 2021-10-27
  • 2021-12-21
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2021-05-03
相关资源
相似解决方案