public void KeyboardCopyWorksTest()
        {
            browser = new WebBrowser(BrowserType.FireFox);

            IBrowser browserObj = (IBrowser) ReflectionHelper.GetField<object>(browser, "_browser");
            KeyboardInput input = new KeyboardInput(browserObj);

            browser.OpenBrowser();
            browser.NavigateBrowser("http://www.google.com");

            input.Copy(GetTestWindowHandle("Google"));

            browser.KillAllOpenBrowsers();
        }
        public void TestPressKeysInSixtyFourBit()
        {
            browser = new WebBrowser(BrowserType.InternetExplorer);

            IBrowser browserObj = (IBrowser) ReflectionHelper.GetField<object>(browser, "_browser");
            KeyboardInput input = new KeyboardInput(browserObj);

            browser.OpenBrowser();
            browser.NavigateBrowser("http://www.google.com");

            try
            {
                ReflectionHelper.SetField(input, "forceSixtyFourBit", true);
                input.ProcessKey(NativeMethods.VkKeyScan('a'));
                input.SendInputString(browserObj.GetCurrentWindowTitle());
            }
            finally
            {
                // Clean up
                ReflectionHelper.SetField(input, "forceSixtyFourBit", false);
                browser.KillAllOpenBrowsers();
            }
        }
        public virtual void Setup()
        {
            try
            {
                SafariSettings.SafariAddress = "120.0.0.1";
                SWAT.WantSuspendOnFail.SuspendTestOnFail = false;
                UserConfigHandler.Save();

                _browser = new WebBrowser(_browserType);
                iBrowserInstance = ReflectionHelper.GetField<IBrowser>(_browser, "_browser");

                this.OpenSwatTestPage();
            }
            catch //If set up fails, try again once more..
            {
                _browser.Sleep(5000);
                _browser.KillAllOpenBrowsers();

                _browser = new WebBrowser(_browserType);
                iBrowserInstance = ReflectionHelper.GetField<IBrowser>(_browser, "_browser");

                this.OpenSwatTestPage();
            }
        }
 public void ChromeClosesPortsCorrectlyAfterUseTest()
 {
     _browser = new WebBrowser(BrowserType.Chrome);
     _browser.OpenBrowser();
     _browser.KillAllOpenBrowsers();
 }