} else if (SystemUtils.IS_OS_WINDOWS) {
chromedriver = "chromedriver.exe";
}
System.setProperty("webdriver.chrome.driver", new File(
"target/webdriver/" + chromedriver).getAbsolutePath());
ChromeOptions options = new ChromeOptions();
// This flag avoids grant the camera
options.addArguments("--use-fake-ui-for-media-stream");
// This flag avoids warning in chrome. See:
// https://code.google.com/p/chromedriver/issues/detail?id=799
options.addArguments("--test-type");
if (!usePhysicalCam) {
// This flag makes using a synthetic video (green with
// spinner) in webrtc. Or it is needed to combine with
// use-file-for-fake-video-capture to use a file faking the
// cam
options.addArguments("--use-fake-device-for-media-stream");
if (video != null) {
options.addArguments("--use-file-for-fake-video-capture="
+ video);
// Alternative: lauch fake cam also in Chrome
// launchFakeCam();
}