selenium中chrome浏览器怎么设置代理

2024-10-14 13:02:36

1、selenium中chrome浏览器怎么设置代理呢?下面就跟小编一起来看一看具体的操作吧。

selenium中chrome浏览器怎么设置代理

3、 将下载好的文件解压,将chromedriver.exe拷贝到chrome根目录,一般是在项目的根目录下。

selenium中chrome浏览器怎么设置代理

5、但是我是放到了Chrome根目录下,所以要设置驱动路径。 System.setProperty("webdriver.chrome.driver","C:\\Program Files (x86)\\Google\\Chrome\\Application\\chromedriver.exe"); WebDriver driver=new ChromeDriver(); //初始化浏览器

selenium中chrome浏览器怎么设置代理
猜你喜欢