Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WWW::Scripter issues with window.history

I am using perl modules WWW::Scripter (based on WWW::Mechanize) with JavaScript plugin and I have problems with an essential JavaScript statement.

use WWW::Scripter;
...
my $web = WWW::Scripter->new(agent => '...', autocheck => 1);
...
$web->use_plugin('JavaScript');
...
$web->add_header(Referer => 'http://...');
...
$web->get($url);

where source code includes essential JavaScript statement, such as:

var x = window.history.length;

and this statement cannot be executed with WWW::Scripter module.

I have no issues with any other, even very complicated jquery statements. Just this one!

Any advice?

like image 428
Ωmega Avatar asked Mar 09 '12 18:03

Ωmega


1 Answers

I have been in contact with the author of WWW::Scripter module and the above issue had been accepted as a bug. New WWW::Scripter version 0.026 with fix has been just uploaded. It should work now...

[UPDATE]

New version 0.027 has been just released. After fix of window.history object in version 0.026, the latest one contains fix for javaEnabled (as implementation of this one was missing) and referer fix for all sub-requests.

like image 73
Ωmega Avatar answered Oct 21 '22 22:10

Ωmega