Loading ...
Sorry, an error occurred while loading the content.

1497Get Browser Object

Expand Messages
  • laphroaig65
    Aug 31, 2006
      Hi.
      I use Win32::OLE to get IE objects and navigate URL's:

      my $apl = Win32::OLE->new("Shell.Application")->Windows;
      for ( 0 .. $apl->count() - 1 ) {
      my $ie = $apl->Item($_);
      my $u = $ie->LocationUrl();
      print "->$u\n";
      ....
      }

      But now I have an application with its own browser object, which is
      not listed in Shell.Application.

      I can get the window (GuiTest)like:

      my @windows = FindWindowLike();
      for (@windows) {
      my $classname = GetClassName($_);
      next unless $classname =~ /FooBar/;
      my $t = GetWindowText($_);
      print "$t\n";
      }

      Is it possible to get the window handle and respectively the
      WebBrowser control to do something like $wbctrl->Navigate($url)?

      Kind regards,
      Peter