首页 > 其他 > 详细

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

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

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 报错:请停用以开发者模式......

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!