public void CustomBrowserWithCustomRemoteDriver(string platformName, string browserName, string browserVersion) { IDriver driver = new CustomRemoteDriver(Browser.Parse(browserName), ReturnBrowserOptions(platformName, browserName, browserVersion)); using (var custom = new BrowserSession(driver)) { custom.Visit("https://saucelabs.com/test/guinea-pig"); Assert.That(custom.ExecuteScript("return 0;"), Is.EqualTo(0)); } }
public void CustomBrowserSessionWithCustomRemoteDriver(string platform, string browserName, string version) { var desiredCapabilites = new DesiredCapabilities(browserName, version, Platform.CurrentPlatform); desiredCapabilites.SetCapability("platform", platform); desiredCapabilites.SetCapability("username", "appiumci"); desiredCapabilites.SetCapability("accessKey", "af4fbd21-6aee-4a01-857f-c7ffba2f0a50"); desiredCapabilites.SetCapability("name", TestContext.CurrentContext.Test.Name); Driver driver = new CustomRemoteDriver(Browser.Parse(browserName), desiredCapabilites); using (var custom = new BrowserSession(driver)) { custom.Visit("https://saucelabs.com/test/guinea-pig"); Assert.That(custom.ExecuteScript("return 0;"), Is.EqualTo(0)); } }