示例#1
0
        protected void ResetApp()
        {
#if __IOS__
            App.Invoke("reset:", string.Empty);
#endif
#if __ANDROID__
            App.Invoke("Reset");
#endif
#if WINDOWS
            WindowsTestBase.Reset();
#endif
        }
示例#2
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);
        }
示例#3
0
 public void RestartApp()
 {
     _session.CloseApp();
     Init(WindowsTestBase.CreateWindowsDriver());
 }
示例#4
0
 public void RestartFromCrash()
 {
     Init(WindowsTestBase.CreateWindowsDriver());
 }