Exemple #1
0
        protected void ResetApp()
        {
#if __IOS__
            App.Invoke("reset:", string.Empty);
#endif
#if __ANDROID__
            App.Invoke("Reset");
#endif
#if __WINDOWS__
            WindowsTestBase.Reset();
#endif
        }
Exemple #2
0
        public string Get(string endpoint)
        {
            if (endpoint == "version")
            {
                try
                {
                    return(_session.CurrentWindowHandle);
                }
                catch (Exception exception)
                {
                    WindowsTestBase.HandleAppClosed(exception);
                    throw;
                }
            }

            return(endpoint);
        }
Exemple #3
0
        public string Get(string endpoint)
        {
            if (endpoint == "version")
            {
                try
                {
                    return(_session.CurrentWindowHandle);
                }
                catch (OpenQA.Selenium.WebDriverException we)
                    when(we.Message.Contains("Currently selected window has been closed"))
                    {
                        _winDriverApp.RestartFromCrash();
                    }
                catch (Exception exception)
                {
                    WindowsTestBase.HandleAppClosed(exception);
                    throw;
                }
            }

            return(endpoint);
        }
Exemple #4
0
        public string Get(string endpoint)
        {
            if (endpoint == "version")
            {
                try
                {
                    return(_session.CurrentWindowHandle);
                }
                catch (OpenQA.Selenium.WebDriverException we)
                    when(we.IsWindowClosedException())
                    {
                        _winDriverApp.RestartFromCrash();
                    }
                catch (Exception exception)
                {
                    WindowsTestBase.HandleAppClosed(exception);
                    throw;
                }
            }

            return(endpoint);
        }
Exemple #5
0
 public void RestartApp()
 {
     _session.CloseApp();
     Init(WindowsTestBase.CreateWindowsDriver());
 }
Exemple #6
0
 public void RestartFromCrash()
 {
     Init(WindowsTestBase.CreateWindowsDriver());
 }