public AppiumOptions CreateCapabilities(Share.Browser browser) { AppiumOptions capabilities = null; switch (browser) { case Share.Browser.Chrome: break; case Share.Browser.Edge: break; case Share.Browser.Firefox: capabilities = FireFox(); break; case Share.Browser.IE: break; case Share.Browser.Safari: break; case Share.Browser.Android: break; case Share.Browser.Ipad: break; case Share.Browser.Iphone: break; } return(capabilities); }
public void SetDriver(Share.Browser browser, string environment, string platform) { AppiumOptions capabilities = null; var localHub = "http://localhost:4723/wd/hub"; string getPlatform = null; switch (browser) { case Share.Browser.Chrome: break; case Share.Browser.Edge: break; case Share.Browser.Firefox: break; case Share.Browser.IE: break; case Share.Browser.Safari: break; case Share.Browser.Android: capabilities = Base.CreateMobileCapabilities(); _androidDriver.Value = new AndroidDriver <AndroidElement>(GlobalVar.Uri, capabilities); break; case Share.Browser.Ipad: case Share.Browser.Iphone: capabilities = Base.CreateMobileCapabilities(); _iosDriver.Value = new IOSDriver <IOSElement>(GlobalVar.Uri, capabilities); break; default: throw new ArgumentOutOfRangeException(nameof(browser), browser, null); } }