in reply to Automation of Multiple Windows of Firefox using WWW::Mechanize::Firefox

If you have "two Firefox windows", you still have one Firefox process.

If you want an easy way to have two Firefox sessions active, install a separate instance of Firefox, for example via Portable Apps Firefox, and have the mozrepl plugin for that Firefox run on a different port.

  • Comment on Re: Automation of Multiple Windows of Firefox using WWW::Mechanize::Firefox

Replies are listed 'Best First'.
Re^2: Automation of Multiple Windows of Firefox using WWW::Mechanize::Firefox
by Anonymous Monk on Aug 15, 2014 at 21:26 UTC
    FWIW, a seperate profile will start a seperate process :)  firefox.exe -no-remote -P profilename
      > FWIW, a seperate profile will start a seperate process :)

      > firefox.exe -no-remote -P profilename

      exactly and separate profiles have their own add-ons.

      I'm using this approach on a daily basis.

      and via Extras > MozRepl > ChangePort menu the ports are changed on an indiviual basis.

      update

      to be able to change the port, have a look to the repl object passed to ->new in WWW::Mechanize::Firefox .

      see:

      repl - a premade MozRepl::RemoteObject instance or a connection string suitable for initializing one

      Cheers Rolf

      (addicted to the Perl Programming Language and ☆☆☆☆ :)

        Thank you all for your suggestions. I find that provided that I change the port of MozRepl of one of the FireFox windows and assign the new port to the instance of WWW::Mechanize::Firefox, my script can control the Firefox window. $mech = WWW::Mechanize::Firefox -> new ( launch => 'firefox', repl => "localhost:$instance_port" )
Re^2: Automation of Multiple Windows of Firefox using WWW::Mechanize::Firefox
by jellisii2 (Hermit) on Aug 15, 2014 at 19:17 UTC