Exemplo n.º 1
0
 private static void Init()
 {
     if (executor == null)
     {
         executor = new SeleniumExecutor();
     }
 }
Exemplo n.º 2
0
        public static void BaseSetUp()
        {
            if (exitWhenNoConnection && ignoreCurrentTest)
            {
                Console.WriteLine(exitNoConnectionStr);
                Environment.Exit(1);
            }

            SeleniumExecutor.ignoreCurrentTest = false;
            executor       = null;
            driver         = null;
            pageDefaultUrl = TestConfiguration.PageMainUrl;

            if (timerServerConnection == null)
            {
                timerServerConnection           = new System.Timers.Timer();
                timerServerConnection.Interval  = 5000;
                timerServerConnection.Elapsed  += OnTimedEvent;
                timerServerConnection.AutoReset = true;
            }

            mainThread = Thread.CurrentThread;
            timerServerConnection.Enabled = true;

            driver = CreateDriver();
            SetDriverResolution();
            parentWindowHandle = driver.CurrentWindowHandle;
            Console.WriteLine("Main page url: " + pageDefaultUrl);
        }