in reply to Re^2: Automation of Multiple Windows of Firefox using WWW::Mechanize::Firefox
in thread Automation of Multiple Windows of Firefox using WWW::Mechanize::Firefox

> 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 ☆☆☆☆ :)

Replies are listed 'Best First'.
Re^4: Automation of Multiple Windows of Firefox using WWW::Mechanize::Firefox
by lalvin (Initiate) on Aug 16, 2014 at 05:10 UTC
    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" )
      Is this a question? If yes, did you try?

      For clarity:

      Your use of the word "window" here is very confusing.

      • One Firefox instance can easily have multiple connected windows (ctrl-n).
      • As shown one Firefox installation can run different unconnected profiles.
      • And finally you can run different Firefox installations at once.
      Visually similar, but a big difference in automation!

      Asking fuzzy questions can deter ppl from replying.

      Cheers Rolf

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