http://qs321.pair.com?node_id=11121410


in reply to WWW::Mechanize::Chrome - how to deal with new windows/tabs

https://metacpan.org/pod/WWW::Mechanize::Chrome#$mech-%3Etab
  • Comment on Re: WWW::Mechanize::Chrome - how to deal with new windows/tabs

Replies are listed 'Best First'.
Re^2: WWW::Mechanize::Chrome - how to deal with new windows/tabs
by mscha (Acolyte) on Sep 06, 2020 at 15:41 UTC
    > https://metacpan.org/pod/WWW::Mechanize::Chrome#$mech-%3Etab

    Yes, I read the documentation. But I don't see how that helps me.

      >Access the tab hash of the Chrome::DevToolsProtocol::Target instance.

      Never used this before, but I am going to guess that this means $tag is a hash reference that contains all the opened tabs. Maybe explore the contents of $tag in the example.

      Why not?

        It only tells you how to retrieve some information about the current tab, like:

        attached: !!perl/scalar:JSON::PP::Boolean 0 browserContextId: 4F77752E9E1225BBC19EF5CB31D66B67 targetId: 3E511FAEF5817D9DAF092EB001F662D6 title: '' type: page url: about:blank

        It doesn't tell you how to change the tab you're looking at.