public FireFox FindFireFox(Constraint findBy)
        {
            var clientPort = FireFox.GetClientPort();
            clientPort.ConnectToExisting();
            
            var ffBrowser = new FFBrowser(clientPort);
            var windowCount = ffBrowser.WindowCount;

            for (var i = 0; i < windowCount; i++)
            {
                ((FireFoxClientPort)ffBrowser.ClientPort).DefineDefaultJSVariablesForWindow(i);
                ffBrowser.ClientPort.InitializeDocument();
                var firefox = CreateBrowserInstance(ffBrowser);
                if (firefox.Matches(findBy)) 
                    return firefox;
            }

            clientPort.CloseConnection();

            return null;
        }
Exemplo n.º 2
0
 public FireFox(FFBrowser ffBrowser)
 {
     _ffBrowser = ffBrowser;
 }
Exemplo n.º 3
0
        private void CreateFireFoxInstance(string url)
        {
            Logger.LogAction("Creating FireFox instance");

            UtilityClass.MoveMousePoinerToTopLeft(Settings.AutoMoveMousePointerToTopLeft);

            var clientPort = GetClientPort();
            clientPort.Connect(url);
            _ffBrowser = new FFBrowser(clientPort);

            FinishInitialization();
            WaitForComplete();
        }
Exemplo n.º 4
0
 protected override FireFox CreateBrowserInstance(FFBrowser browser)
 {
     return new CustomFireFox(browser);
 }
Exemplo n.º 5
0
 public CustomFireFox(FFBrowser browser)
     : base(browser)
 {
 }
 public virtual FireFox CreateBrowserInstance(FFBrowser ffBrowser)
 {
     return new FireFox(ffBrowser);
 }