Questions tagged [www-mechanize-firefox]

WWW::Mechanize::Firefox - use Firefox as if it were WWW::Mechanize

A Perl module to use Firefox as if it were WWW::Mechanize

https://metacpan.org/pod/WWW::Mechanize::Firefox

This module will let you automate Firefox through the Mozrepl plugin. You need to have installed that plugin in your Firefox.

Note that the module only supports Firefox up to Firefox version 54 . After that, Firefox does not support the mozrepl plugin anymore. That plugin is needed for the functionality of this module.

Also see the Troubleshooting FAQ.

60 questions
7
votes
4 answers

Is there a Node.js equivalent of Perl's WWW::Mechanize?

I'm searching a module for Node which would be similar to WWW::Mechanize for Perl. Or even better to WWW::Mechanize::Firefox. The main functionality would be to find and submit form by name, class or id. The ability to handle cookies would be…
Sami
  • 614
  • 7
  • 19
4
votes
1 answer

WWW::Mechanize::Firefox xpath on previous result

Can I execute a XPath query on previous result? I have this xpath: my @objDivRes = $objBrow->xpath('//div[@id="result"]/ol/div/li', all => 1); but when I execute xpath function on previous result my @objLink =…
3
votes
2 answers

How can I call jQuery or Angular functions via WWW::Mechanize::Firefox?

I'm trying to execute jQuery/Angular calls via WWW::Mechanize::Firefox's eval_in_page. I'm guessing there is some sort of scope issue, because I'm getting errors. If I try to execute this…
Todd G.
  • 31
  • 2
3
votes
0 answers

How to input text into Facebook's event form with WWW::Mechanize::Firefox?

Facebook has no API for submitting an event to a Facebook page. So I'm attempting to use WWW::Mechanize::Firefox with this script. use strict; use warnings; use feature qw(say); use WWW::Mechanize::Firefox; my $mech =…
StevieD
  • 2,329
  • 13
  • 30
3
votes
2 answers

WWW::Mechanize::Firefox follow_link not working

I'm trying to follow a link in Perl. My initial code: use WWW::Mechanize::Firefox; use Crypt::SSLeay; use HTML::TagParser; use URI::Fetch; $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME}=0; #not verifying certificate my $url = 'https://'; $url = $url.@ARGV[0];…
2
votes
0 answers

How to upload the file on webpage using WWW::Mechanize::Firefox

I am trying to automate the some workflow. which includes the login to the website and filling couple of data and then Upload pdf file on drag and drop section and upon the upload click on proceed. I am using the Perl WWW::Mechanize::Firefox module…
2
votes
2 answers

How do I find the second link occurance using WWW::Mechanize::Firefox and find_link_dom in Perl?

I am using find_link_dom and it's working... to find the first link that matches. I need to find the second. Here is my line: my $link = $mech->find_link_dom ( text_regex => 'abc' ); Is there a way for this command to return the second link that…
Bill
  • 1,169
  • 2
  • 19
  • 41
2
votes
2 answers

Close Tab Based on Title

How would I close a tab based on it's title using WWW::Mechanize::Firefox? Here is what I currently have: my $ff = Firefox::Application->new(); my @tab_info = $ff->openTabs(); foreach my $tab (@tab_info) { if($tab->{title} eq "TITLE HERE") { …
Bijan
  • 6,011
  • 13
  • 64
  • 120
2
votes
2 answers

How to use synchronize method with WWW::Mechanize::Firefox?

I'm using WWW::Mechanize::Firefox and am trying to use the synchronize method like so: $mech->get('http://example.com/wp-login.php'); $mech->submit_form( with_fields => {log => 'admin', pwd => 'password'}); $self->synchronize( 'DOMContentLoaded',…
StevieD
  • 2,329
  • 13
  • 30
2
votes
1 answer

Perl Fill Out Form Based on Element ID

I am trying to use WWW::Mechanize to fill out a form. Unfortunately my page requires JS so I am now using WWW::Mechanize::Firefox. Here is the element I am trying to fill out. The set_field()…
Bijan
  • 6,011
  • 13
  • 64
  • 120
2
votes
1 answer

How do I set a value with WWW::Mechanize::Firefox when there are three tags with the same name?

I am using WWW::Mechanize::Firefox to automate some interaction with a web page. Evertyhing works well until I reach a page where I want the script to enter a specific value into an box. Unfortunatly, this page has three
René Nyffenegger
  • 35,550
  • 26
  • 140
  • 232
2
votes
1 answer

Add the product to cart using WWW::Mechanize - Perl

I'm writing a script that selects a size and adds the product to cart here is where it is http://store.nike.com/us/en_us/pd/free-4-flyknit-running-shoe/pid-1064825/pgid-1481072 use WWW::Mechanize::Firefox; $mech = WWW::Mechanize::Firefox->new(); my…
Brett
  • 65
  • 5
2
votes
1 answer

Perl WWW::Mechanize::Firefox timeout implementation

I am using WWW::Mechanize::Firefox along with MozRepl plugin in Firefox. The code works properly to fetch content from sites by sending them an HTTP GET request. I am going through a list of URLs and sending an HTTP GET Request to each of…
Neon Flash
  • 2,801
  • 9
  • 48
  • 84
2
votes
1 answer

Wait for a post to appear using WWW::Mechanize::Firefox

I´m trying to get the information within the item-contents divisions of the webpage and i would like my script to wait and read any new item-content divisions appearing in the webpage. Any suggestions? use WWW::Mechanize::Firefox; my $mech =…
user3013745
  • 59
  • 1
  • 7
2
votes
3 answers

WWW::Mechanize::Firefox and MozRepl

I wrote some code with help from examples but when I run it I'm getting error in Ubuntu Server 12.04.2 LTS: Failed to connect to , problem connecting to "localhost", port 4242: Connection refused at /usr/local/share/perl/5.14.2/MozRepl/Client.pm…
Essential
  • 21
  • 1
  • 2
1
2 3 4