WWW::Mechanize::Firefox::FAQ - Frequently Asked Questions on WWW::Mechanize::Firefox
The module itself should work with any version of Firefox starting from version 2.0. Depending on how deep your Perl code interacts with the application structure of Firefox, you will or will not encounter version specific problems.
If you are only using WWW::Mechanize::Firefox to access the DOM of web pages, you will not notice any version dependencies.
If you use WWW::Mechanize::Firefox to modify the behaviour of Firefox itself, for example by changing settings through Perl code, you will likely be affected by reorganizations of the application structure.
If you run a unixish operating system, like OSX or Ubuntu or some other Linux distribution, then Firefox will connect to your X server and display a window there. If you do not want Firefox to actually display on your monitor, many people have had success by running Firefox on another X server separate from the main X server, like Xvfb.
Personally, I would prefer to have a "headless Firefox" that does not need a windowing environment. So far, I am unaware of this actually existing.
The easiest way is to install a "portable" version (or two) of Firefox. This instance will not pollute your main profile and can use separate add-ons and settings. Use the following code to launch and connect to your separate instance:
my $instance_port = 4243; # 4242 is likely occupied by your main Firefox instance $ff = Firefox::Application->new( autodie => 0, #log => [qw[debug]], launch => ['c:/Path/to/portable/FirefoxPortable.exe', '-repl', $instance_port], repl => "localhost:$instance_port", );
If you want to automate Internet Explorer, there is Win32::IE::Mechanize. This module is not API compatible and does not let you conveniently get at the DOM methods.
There is a plugin called "chromerepl" for Google Chrome. This claims to be what
mozrepl is for Firefox. The problem is that the Chrome plugin does not download, so I cannot tell you whether it would work.
In principle, it should be possible to write a similar module, WWW::Mechanize::Chrome (or maybe WWW::Mechanize::Chromatic) once the plugin is proven to work. The deeper interaction with the application won't work immediately because Chrome and Firefox still have a different application structure.
If you encounter problems with a website or want feedback on how to approach extracting data from a website, please post your question on http://perlmonks.org. Many competent people and I read this site and will answer your questions.
You do not need to sign up there. You can just go to http://perlmonks.org/?node=SoPW and post your question directly.
I do not monitor other forums, so Perlmonks is the best site to get answers about WWW::Mechanize::Firefox.
Please use the CPAN RT queue to report and review bugs:
or send a mail with your bug report to
Please do make sure that you include a small, self-contained program that reproduces the problem and shows what you expect to happen and what happens instead. This makes it much easier for me to help you better in resolving the problem.
Copyright 2010-2013 by Max Maischein
All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.