tomgracey has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, I've been playing around with WWW::Mechanize::Firefox, and it's all going rather well - except I'd like to be able to launch the browser and have it select the profile of my choice when it loads. Does anyone know if this can be done and if so how? I couldn't find anything in the documentation about it and a web search didn't get me very far either. Thanks...
  • Comment on Launching WWW::Mechanize::Firefox with a certain profile

Replies are listed 'Best First'.
Re: Launching WWW::Mechanize::Firefox with a certain profile
by Corion (Patriarch) on May 05, 2011 at 12:32 UTC
Re: Launching WWW::Mechanize::Firefox with a certain profile
by nysus (Parson) on Apr 20, 2016 at 00:58 UTC

    I needed to have several FF instances running at the same time so I set up profiles in Firefox for each instance of FF needed and launch them like so:

    $mech = WWW::Mechanize::Firefox->new(launch => ['firefox', '-P', "Prof +ileName", '-repl', '4244'], repl => 'localhost:4244');

    Each profile set up in Firefox will need to have the MozRepl add-on installed and also have a different port number set for repl. The port number for repl can be changed from the FF menu in Tools -> MozRepl -> Change port.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks