Example #1
0
        public void Dispose()
        {
            ProxyHelper.SetProxy(null);

            if (browserWrapperIEImpl != null)
            {
                try { browserWrapperIEImpl.Close(); }
                catch { }
                try { browserWrapperIEImpl.Dispose(); }
                catch { }
                try { browserWrapperIEImpl.Destroy(); }
                catch { }
            }

            browserWrapperIEImpl = null;
        }
Example #2
0
        public int StartTest(PageDataCollectorStartInfo startInfo)
        {
            if (startInfo.ClearCache)
            {
                try
                {
                    WatiN.Core.Native.InternetExplorer.WinInet.ClearCache();
                }
                catch
                {
                }
            }

            if (ProxyHelper.SetProxy(startInfo.ProxyAddress) == false)
            {
                TestEnded(false, PageDataCollectorErrors.CantSetProxy);
            }
            else
            {
                browserWrapperIEImpl.StartTest(startInfo);

                lock (returnLock)
                {
                    if (returnCode == -1)
                    {
                        Monitor.Wait(returnLock, startInfo.Timeout * 1000 * 60);
                    }
                    if (returnCode == -1)
                    {
                        returnCode = (int)PageDataCollectorErrors.TestTimeout;
                    }
                }
            }

            Dispose();

            return(returnCode);
        }