SauceSession { public SauceSession withChrome() { chromeOptions = new ChromeOptions(); chromeOptions.setExperimentalOption("w3c", true); browserName = "Chrome"; return this; } SauceSession();  SauceSession(RemoteDriverInterface remoteManager); SauceSession start(); MutableCapabilities getCapabilities(); MutableCapabilities getSauceOptions(); void setBrowserOptions(String browserName); SauceSession withChrome(); SauceSession withFirefox(); RemoteDriverInterface getDriverManager(); MutableCapabilities getSauceOptionsCapability(); WebDriver getDriver(); SauceSession withMacOsMojave(); SauceSession withMacOsHighSierra(); SauceSession withBrowserVersion(String browserVersion); SauceSession withEdge(); SauceSession withIE(); SauceSession withPlatform(String operatingSystem); SauceSession withBrowser(String browserName, String browserVersion); SauceSession withBrowser(String browserName); SauceSession withTestName(String testName); SauceSession withBuildName(String buildName); void stop(); void passed(); void failed(); void setTestName(String testName); void setBuildTag(String buildTag); void setBuild(String build); public SauceApi test; public MutableCapabilities capabilities; }
@Test public void withChrome_invoked_setsBrowserNameToChrome() throws MalformedURLException { sauceSession = new SauceSession().withChrome(); assertThat(sauceSession.browserName, IsEqualIgnoringCase.equalToIgnoringCase("chrome")); }