mscha has asked for the wisdom of the Perl Monks concerning the following question:
I'm starting to try out WWW::Mechanize::Chrome, and it looks pretty good!
However, I'm having trouble when following links that open a new window (window.open) or tab (target="_blank"). The new window/tab does open, but the original tab remains selected, and I can't figure out a way to select (or otherwise interact with) the new window/tab.
Any way to do this?
$mech->get('https://www.mscha.org/knmi/summer.cgi?month=-1'); $mech->follow_link(text=>'2020'); # opens a new window my $png = $mech->content_as_png;
$png now contains a screenshot of the original window, not the newly opened one. Any way to access the newly opened window?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize::Chrome - how to deal with new windows/tabs
by Corion (Patriarch) on Sep 06, 2020 at 17:54 UTC | |
by mscha (Acolyte) on Sep 06, 2020 at 20:07 UTC | |
|
Re: WWW::Mechanize::Chrome - how to deal with new windows/tabs
by Anonymous Monk on Sep 06, 2020 at 15:36 UTC | |
by mscha (Acolyte) on Sep 06, 2020 at 15:41 UTC | |
by perlfan (Parson) on Sep 06, 2020 at 17:02 UTC | |
by Anonymous Monk on Sep 06, 2020 at 16:16 UTC | |
by mscha (Acolyte) on Sep 06, 2020 at 16:58 UTC | |
|
Re: WWW::Mechanize::Chrome - how to deal with new windows/tabs
by Anonymous Monk on Sep 06, 2020 at 20:56 UTC |