/// <summary> /// construct a Selenium Action Manager with an Automation Engine /// </summary> /// <param name="automation">the Automation Engine</param> public SeleniumActionManager(abt.Automation automation, Browser browser) : base(automation) { switch (browser) { case Browser.Chrome: { OpenQA.Selenium.Chrome.ChromeDriverService service = OpenQA.Selenium.Chrome.ChromeDriverService.CreateDefaultService(); service.HideCommandPromptWindow = true; WebDriver = new OpenQA.Selenium.Chrome.ChromeDriver(service, new OpenQA.Selenium.Chrome.ChromeOptions()); break; } case Browser.FireFox: WebDriver = new OpenQA.Selenium.Firefox.FirefoxDriver(); break; case Browser.Safari: WebDriver = new OpenQA.Selenium.Safari.SafariDriver(); break; default: WebDriver = new OpenQA.Selenium.IE.InternetExplorerDriver(); break; } ; WebDriver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 30)); RegisterAction(new ActionClick(WebDriver)); RegisterAction(new ActionOpenURL(WebDriver)); RegisterAction(new ActionRefresh(WebDriver)); RegisterAction(new ActionGoBack(WebDriver)); }
/// <summary> /// construct an ActionManager with an Automation engine /// </summary> /// <param name="automation">the Automation engine</param> public UIAActionManager(abt.Automation automation) : base(automation) { RegisterAction(new ActionClick()); RegisterAction(new ActionStartProgram()); RegisterAction(new ActionCloseWindow()); WaitTime = new TimeSpan(0, 0, 30); }
static void Main(string[] args) { abt.Automation auto = new abt.Automation(); }