"be consistent" | |
PerlMonks |
Re: some doubts on my first steps with WWW::Mechanize::Chrome -- further steps and doubtsby Discipulus (Canon) |
on May 20, 2020 at 17:38 UTC ( [id://11116993]=note: print w/replies, xml ) | Need Help?? |
Thanks Corion and all, I still have some, stupid, question about the web in general and some issue with, anyway woderful, WWW::Mechanize::Chrome module. Stupid question: if I use $mech->eval_in_page ( qq( xajax_viewWindow(container.open({saveName: 'profiles', title: ''}) ) )); with an empty title while the orginal code of the page was title: 'TITLE' this action is just local to my browser or can be catched on the server side spotting the missing title? Sorry for my limited understanding of the whole web mechanisms. More on WMC: in addition to the incognito param (the author will fix it soon ;) I also have problem with the autoclose one. The following not so short example will demonstrate it. In brief if the browser was started by the perl program autoclose => 0 has no effect. This happens with both chrome and chromium. By other hand if the browser was started before the perl program with --remote-debugging-port=9222 as arg then autoclose => 0 will work. The opposite setting, autoclose => 1 will work as expected closing the browser at the end of the perl program if the browser was started before perl and also if launched by perl.
Thanks in advance L* PS I'd also like to know if the current running chrome instance was started with the correct parameter --remote-debugging-port=9222 and, shooting in the dark I tried $mech->target() but I'm a bit confused: if i use use Data::Dump; dd $mech->target(); it dies with:
and now I rembember i forced installation of IO::Async with no testing.. With good old Data::Dumper I get a whole mess of lines containing 'port' => 9222,'is_connected' => 1 that sounds promising, but sincerely I dunno how to access it: after the first level becomes difficult to parse:
PPS after some brute forcing I got something useful:
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
In Section
Seekers of Perl Wisdom
|
|