public virtual RemoteWebDriver BuildWebDriver(RemoteWebDriverOptions options = null) { if (options == null) { options = new RemoteWebDriverOptions(); } //FirefoxDriver driver = new FirefoxDriver(); ChromeOptions chromeOptions = new ChromeOptions { }; //chromeOptions.AddArguments("--lang=fa"); ChromeDriver driver = new ChromeDriver(chromeOptions); //InternetExplorerDriver driver = new InternetExplorerDriver(); //DesiredCapabilities capabilities = new DesiredCapabilities(); //capabilities.SetCapability("deviceName", "donatello"); //capabilities.SetCapability("platformVersion", "4.2.2"); //capabilities.SetCapability("uid", "192.168.21.80:5555"); //capabilities.SetCapability("fullReset", "True"); //capabilities.SetCapability(MobileCapabilityType.App, "Browser"); //capabilities.SetCapability("platformName", "Android"); //AndroidDriver<AndroidElement> driver = new AndroidDriver<AndroidElement>(new Uri("http://*****:*****@"{Uri}{options.Uri}"); } else if (options.Token != null) { driver.Navigate().GoToUrl($@"{Uri}SignIn#id_token=0&access_token={options.Token.AccessToken}&token_type={options.Token.TokenType}&expires_in=86400&scope=openid profile user_info&state={{""pathname"":""/""}}&session_state=0"); } else { driver.Navigate().GoToUrl(Uri); } if (options.ClientSideTest == true) { driver.GetElementById("testsConsole"); } } catch { driver.Dispose(); throw; } return(driver); }
public override RemoteWebDriver GetWebDriver(RemoteWebDriverOptions options = null) { throw new NotSupportedException(); }