0

I am trying to test a WebRTC application using BrowserStack to check the behavior through different browsers. I have a selenium script which is working on my local machine and also I have implemented the BroswerStack project https://github.com/browserstack/testng-browserstack including my selenium script.

The situation is that at the execution moment in BrowserStack, the script is stuck in the allow microphone part.

I had tried passing this argument "use-fake-ui-for-media-stream" as part of the capabilities in this way:

"chrome": {
      "os": "Windows",
      "os_version": "8",
      "browser": "Chrome",
      "browser_version": "70.0",
      "resolution": "1920x1080",
      "args":["use-fake-ui-for-media-stream"]
}

The way that I used to pass arguments in my local script is different due to I'm using a specific driver. Example:

ChromeOptions ops = new ChromeOptions();
ops.addArguments("use-fake-ui-for-media-stream");
WebDriver driver = new ChromeDriver(ops);

Maybe the problem is related to the way that I instance the remote web driver used by BroserStack

driver = new RemoteWebDriver(
                new URL("http://" + username + ":" + accessKey + "@" + config.get("server") + "/wd/hub"), capabilities);

1 Answer 1

1

My partner gave me the answer. The correct way to configure the argument is:

"chrome": {
      "os": "Windows",
      "os_version": "8",
      "browser": "Chrome",
      "browser_version": "70.0",
      "resolution": "1920x1080",
      "chromeOptions": {"args":["use-fake-ui-for-media-stream"]}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.