in reply to How to control two tabs at the same time with WWW::Mechanize::Firefox
1. create two different WWW::Mechanize::Firefox objects one after the other. => seems to work (at least for opening the two pages in two different tabs), but i get this warning when i create the second browser:Subroutine MozRepl::__load_plugins redefined at C:/strawberry/perl/sit +e/lib/Module/Pluggable/Fast.pm line 104, <DATA> line 1.
That warning is an unfortunate side-effect of Module::Pluggable::Fast, the plug-in system used by MozRepl. It is otherwise harmless.
2. get the current browser's Firefox::Application, open a new tab and select it. finally, try to use the Application's browser with Firefox::Application::browser(), and get() a page with it. => it gives me this output :I suppose it was simply not the right thing to do.Use of uninitialized value in concatenation (.) or string at C:/strawb +erry/perl/site/lib/MozRepl/RemoteObject.pm line 835, <> line 3. MozRe +pl::RemoteObject: : Object has no function get at test_tabs_applicati +on.pl line 72.
Exactly - a Firefox tab has vastly different methods from WWW::Mechanize(::Firefox). There should be a way to construct another WWW::Mechanize::Firefox object by supplying a freshly connected tab, but that is no option yet. Maybe in a later version, but as you can simply create another WWW::Mechanize::Firefox object, it is no high priority.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to control two tabs at the same time with WWW::Mechanize::Firefox
by mascip (Pilgrim) on Mar 11, 2012 at 19:33 UTC | |
by Corion (Patriarch) on Mar 11, 2012 at 20:28 UTC | |
by mascip (Pilgrim) on Mar 11, 2012 at 21:22 UTC | |
by Corion (Patriarch) on Mar 11, 2012 at 22:07 UTC | |
by mascip (Pilgrim) on Mar 12, 2012 at 00:00 UTC | |
by mascip (Pilgrim) on Mar 12, 2012 at 12:02 UTC |