dependency>
groupId>com.jcraft
artifactId>jsch
version>0.1.53
/dependency>
import com.jcraft.jsch.JSchException;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeDriverService;
import org.openqa.selenium.chrome.ChromeOptions;
@Before
public void start() throws JSchException {
WebDriverRunner.setWebDriver(getChrome());
}
private static WebDriver getChrome() {
final ChromeDriverService service = new ChromeDriverService.Builder()
.usingDriverExecutable(new File(“D:/Selenium/chromedriver.exe”))
.usingAnyFreePort()
.build();
final ChromeOptions option = new ChromeOptions();
option.addArguments("–always-authorize-plugins", “–start-maximized”, “–scroll-end-effect=1”);
EventFiringWebDriver newDriver = new EventFiringWebDriver(new ChromeDriver(service, option));
return newDriver;
}
Попробуй как то так ))