码迷,mamicode.com
首页 > 其他好文 > 详细

做UI自动化一直启动不成功Chrome 报错:请停用以开发者模式......

时间:2018-09-15 14:33:57      阅读:333      评论:0      收藏:0      [点我收藏+]

标签:stat   ack   bdr   case   new   开发者   import   斜杠   acs   

1、遇见这个问题,先看看是否chromedriver没生效

2、找到代码对应目录,下载chrome对应版本的chromedriver替换进去

package com.sf.acsp.ebill.testcase;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
//import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Test {
public static void main(String[] args)
{
WebDriver driver;
System.setProperty("webdriver.chrome.driver", "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver.exe");
//这里的驱动路径一定要写双斜杠,转义
driver = new ChromeDriver();
driver.get("https://www.baidu.com");
}
}

做UI自动化一直启动不成功Chrome 报错:请停用以开发者模式......

标签:stat   ack   bdr   case   new   开发者   import   斜杠   acs   

原文地址:https://www.cnblogs.com/lianlianqingning/p/9650787.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!