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?
I have been in contact with the author of
WWW::Scriptermodule and the above issue had been accepted as a bug. NewWWW::Scripterversion 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.historyobject in version 0.026, the latest one contains fix forjavaEnabled(as implementation of this one was missing) andrefererfix for all sub-requests.