网上这块设置参数的java的太少了,通过不懈努力,终于实现了,记录一下:
需要注意的是如果有正在运行的浏览器正在运行,用户文件就读取不成功,所以必须在运行前将谷歌浏览器的窗口全部关闭
package com.test.action;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.server.Session;
import org.testng.annotations.Optional;
import org.testng.annotations

最低0.47元/天 解锁文章
1807

被折叠的 条评论
为什么被折叠?



