theCapabilities.setCapability(ChromeOptions.CAPABILITY, theOptions); final RemoteWebDriver theDriver = new RemoteWebDriver(theDriverService.getUrl(), theCapabilities);
public DebateFetcher(String chromeDriverFile) throws IOException { service = new ChromeDriverService.Builder() .usingDriverExecutable( new File(chromeDriverFile)) .usingAnyFreePort() .withEnvironment(ImmutableMap.of("DISPLAY", ":20")).build(); service.start(); DesiredCapabilities capabilities = DesiredCapabilities.chrome(); driver = new RemoteWebDriver(service.getUrl(), capabilities); }
driver = new RemoteWebDriver(service.getUrl(), locator.getCapabilities());
private WebDriver newDriverForTest() { final ChromeOptions theOptions = new ChromeOptions().setHeadless(true); theOptions.addArguments("--js-flags=experimental-wasm-eh"); theOptions.addArguments("--enable-experimental-wasm-eh"); final LoggingPreferences theLoggingPreferences = new LoggingPreferences(); theLoggingPreferences.enable(LogType.BROWSER, Level.ALL); theOptions.setCapability(CapabilityType.LOGGING_PREFS, theLoggingPreferences); final DesiredCapabilities theCapabilities = DesiredCapabilities.chrome(); theCapabilities.setCapability(ChromeOptions.CAPABILITY, theOptions); return new RemoteWebDriver(DRIVERSERVICE.getUrl(), theCapabilities); }
private WebDriver newDriverForTest() { final ChromeOptions theOptions = new ChromeOptions().setHeadless(true); theOptions.addArguments("--js-flags=experimental-wasm-eh"); theOptions.addArguments("--enable-experimental-wasm-eh"); final LoggingPreferences theLoggingPreferences = new LoggingPreferences(); theLoggingPreferences.enable(LogType.BROWSER, Level.ALL); theOptions.setCapability(CapabilityType.LOGGING_PREFS, theLoggingPreferences); final DesiredCapabilities theCapabilities = DesiredCapabilities.chrome(); theCapabilities.setCapability(ChromeOptions.CAPABILITY, theOptions); return new RemoteWebDriver(DRIVERSERVICE.getUrl(), theCapabilities); }