/// <summary> /// Create instance for driver context. /// </summary> /// <param name="browser"></param> /// <returns></returns> public static HtmlDriverContext CreateInstance(BrowserType browser) { Log.Trace("Start " + browser + " driver......"); driverContext = new HtmlDriverContext(browser); Log.Trace(driverContext.driver + " started!"); return(driverContext); }
public ApplicationBase(string url) { this.waitTimeout = GlobalSetting.Config.ApplicationActiveTimeout; HtmlDriverContext.CreateInstance(GlobalSetting.Config.Browser); this.driver = this.Driver; this.windowHandle = this.Driver.CurrentWindowHandle; Log.Trace("Current driver =>" + this.Driver); Log.Trace("Current WindowHandle =>" + windowHandle); this.url = url; GoToUrl(url); }
public override void SetActive() { HtmlDriverContext.GetInstance(driver); SetWindowActive(windowHandle); }
public DriverContext CreateDriverContext() { return(HtmlDriverContext.GetInstance()); }
/// <summary> /// Get instance from existing driver. /// </summary> /// <param name="driver"></param> /// <returns></returns> public static HtmlDriverContext GetInstance(IWebDriver driver) { driverContext = new HtmlDriverContext(driver); return(driverContext); }