예제 #1
0
        /// <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);
        }
예제 #2
0
 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);
 }
예제 #3
0
 public override void SetActive()
 {
     HtmlDriverContext.GetInstance(driver);
     SetWindowActive(windowHandle);
 }
 public DriverContext CreateDriverContext()
 {
     return(HtmlDriverContext.GetInstance());
 }
예제 #5
0
        /// <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);
        }