selenium打开chrome浏览器时,地址栏下方会出现该提示“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该提示会消失