testcontainers-java icon indicating copy to clipboard operation
testcontainers-java copied to clipboard

allow to pass Capabilities into BrowserWebDriverContainer#withDesiredCapabilities

Open kamkie opened this issue 8 years ago • 3 comments

I would like to use ChromeOptions to configure chrome instance

  public static ChromeOptions buildChromeOptions() {
        ChromeOptions chromeOptions = new ChromeOptions();
        chromeOptions.addArguments("--lang=pl", "--window-size=1600,900", "--disable-extensions");
        Map<String, Object> prefs = new HashMap<>();
        prefs.put("intl.accept_languages", "pl");
        chromeOptions.setExperimentalOption("prefs", prefs);
        return chromeOptions;
    }

kamkie avatar Feb 27 '18 20:02 kamkie

+1

Using more recent versions of Selenium (3.X), the following log message is printed when creating a BrowserWebDriverContainer with DesiredCapabilities:

INFO: Using 'new ChromeOptions()' is preferred to 'DesiredCapabilities.chrome()'

unfortunately BrowserWebDriverContainer only exposes:

public SELF withDesiredCapabilities(DesiredCapabilities desiredCapabilities) instead of the parent interface Capabilities.

yellowstonesoftware avatar Jul 31 '18 18:07 yellowstonesoftware

I'm using selenium-jupiter for junit 5 and it works great

kamkie avatar Jul 31 '18 19:07 kamkie

@kamkie @peternitro Would someone like to contribute this feature?

kiview avatar Oct 01 '18 10:10 kiview