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.

59 questions
2
votes
2 answers

How can we tell WWW::Mechanize::Firefox to not wait for a response or a postback?

Hi I am using a loop to get various pages. The code: while($stm->fetch()) { $mech->get(**#TheURL**); $mech->select( 'this', 'that' ); $mech->tick( 'this' => undef ); $mech->tick( 'this' => undef ); …
tread
  • 10,133
  • 17
  • 95
  • 170
2
votes
2 answers

How do you select specific HTML elements with no class or ID using WWW::Mechanize::Firefox?

I'm trying to loop through links on a page but i only want to loop through specific ones. The problem is that the links in anchors do not have CSS ids or classes at all. eg.
tread
  • 10,133
  • 17
  • 95
  • 170
2
votes
1 answer

How do you give WWW::Mechanize::Firefox permission to launch Firefox?

I'm on a Mac. I've got a simple Perl script that uses WWW::Mechanize::Firefox to pull up a web page. The script works perfectly when Firefox is already open and running on my computer. Here's the line the creates the object: my $mech =…
StevieD
  • 6,925
  • 2
  • 25
  • 45
1
vote
0 answers

Using X11::GUITest on a modern mac

I'd like to use the X11::GUITest perl module to control my browser in conjunction with the WWW::Mechanize::Firefox module on my Mac running High Sierra. I downloaded and installed XQuartz. I'm not sure what to do next get this to work. When I…
StevieD
  • 6,925
  • 2
  • 25
  • 45
1
vote
0 answers

Filling unnamed text fields in Mechanize::Firefox

I'm trying to fill some unnamed fields using $mech->fields but I ran out of hair on my head to pull off, please help.
1
vote
0 answers

Run the Mechanize::Firefox script in VNC server using Net::SSH::perl?

I have done the script with Mechanize::Firefox. I need to run the script in VNC server. I'm working on ubuntu. I have installed krdc software to run the scripts. Before running the script I'm starting the vnc server by using the following command…
mkHun
  • 5,891
  • 8
  • 38
  • 85
1
vote
1 answer

Perl Mechanize identify content between span tag within specific div tag

Perl WWW::Mechanize::Firefox has successfully retrieved the contents of the web page, and stored in the scalar variable $content. my $url = 'http://finance.yahoo.com/quote/AAPL/financials?p=AAPL'; $mech->get($url); my $content=…
1
vote
1 answer

Perl Mechanize Firefox click button (not in HTML form)

Please consider the following code: I need help clicking the button Quarterly on the web page. #!/usr/bin/perl use strict; use WWW::Mechanize::Firefox; my $mech = WWW::Mechanize::Firefox-> new ( create => 1, …
1
vote
1 answer

What does $mech->xpath() return using WWW::Mechanize::Firefox?

What does $mech->xpath() return using WWW::Mechanize::Firefox? The documentation says it "Returns the matched results.", which doesn't help. What object or array of objects is returned and where is a specification of this object so I can reference…
CJ7
  • 22,579
  • 65
  • 193
  • 321
1
vote
1 answer

WWW::Mechanize::Firefox clicking all images of a class

I am trying to crawl all links on an internal site using WWW::Mechanize::Firefox. The site loads some content via javascript, so I have to click certain elements of the same class "expand" at first. The structure of the site is like this: …
yulivee
  • 307
  • 2
  • 10
1
vote
0 answers

Executing JavaScript function using MozRepl and Perl (WWW::Mechanize::Firefox)

I am using the following Perl snippet to execute a JavaScript function using MozRepl. However, I get the error message "MozRepl::RemoteObject: TypeError: myFunction is not a function at test.pl line 16." What am I doing wrong? use v5.10; use…
user1769925
  • 588
  • 1
  • 6
  • 15
1
vote
0 answers

Perl Mechanize firefox click event gets script hang

While working with Perl Mechanize Firefox I am trying to download a file by clicking an image on page I can see file getting downloaded in browser but script gets hanged in the console and does not proceed. This is my code…
Neeraj Pandey
  • 121
  • 1
  • 6
1
vote
1 answer

Typing in text into a field with WWW::Firefox::Mechanize

I am using WWW::Mechanize::Firefox to do some automation task on a website. Now I am facing the problem that I need to simulate the entering of characters into an field. This is because the typing causes the site to do some AJAX…
René Nyffenegger
  • 39,402
  • 33
  • 158
  • 293
1
vote
1 answer

Perl Par::Packer Can't find module issue

I have a perl program that uses WWW::Mechanize::Firefox on windows 7 32bit with strawberry perl. It works fine with the command C:\>perl testcase.pl. When I compile it with C:\>pp -o testcase.exe testcase.pl it compiles with no errors. When I run…
1
vote
1 answer

Mechanize Firefox synchronize option is not working

I am trying to use Mechanize::Firefox but it is hanging after the first click. When you pass in the object to click it does not seem to be honoring the synchronize flag. Any ideas? Is this a bug or am I just doing it wrong? my @objects =…
Steve Lloyd
  • 773
  • 2
  • 12
  • 33