janh˛ has asked for the wisdom of the Perl Monks concerning the following question:
I'm having a bit of trouble with WWW::Mechanize::Firefox ( or, more specifically, MozRepl::RemoteObject, but I'm not completly sure if I just use W::M::F the wrong way).
Here's a short example that reproduces my problem with MozRepl 1.1 and Firefox versions 11 (Win 7 64 and Win XP) and 3.6.28 (Win XP) and the perl script on Win7 64, Winxp and debian linux. Perl-Versions: ActivePerl 5.10.0 on Windows, 5.10.1 on linux):
#!/usr/bin/perl use WWW::Mechanize::Firefox; my $ff = WWW::Mechanize::Firefox->new(activate => 1, autoclose => 0, ' +tab' => "current"); my @links = $ff->selector('a'); for my $link (@links) { my @keys = $link->__keys(); }
This fails in my setup with the following message: MozRepl::RemoteObject: TypeError: obj.hasOwnProperty is not a function at test-mozrepl.pl line 6
The problem seems to be in the javascript in MozRepl::RemoteObject, line 1289 in RemoteObject.pm (Version 0.30):
if (obj.hasOwnProperty(el)) {
I've tried to look into the js side, obj is of type "object" but obj.hasOwnProperty does not exist. I know too little about the interna of mozrepl and MozRepl::RemoteObject to guess smart checks I could do.
Any hints to what I am missing?
Please let me know which additional information might be helpful in diagnosing the problem.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize::Firefox / MozRepl::RemoteObject
by Corion (Patriarch) on Mar 31, 2012 at 18:29 UTC | |
by janh˛ (Initiate) on Mar 31, 2012 at 20:14 UTC | |
by janh˛ (Initiate) on Apr 02, 2012 at 07:39 UTC |