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

Re: GetComboBox on InternetExplorer_TridentCmboBx

Expand Messages
  • rmqa_group
    Piotr, I ve tried to keep it simple :) ... use Win32::GuiTest qw/:ALL/; use warnings; # Open IE at address http://search.cpan.org/ before running my @ActWin
    Message 1 of 7 , Aug 17, 2005
      Piotr,

      I've tried to keep it simple :)

      ----
      use Win32::GuiTest qw/:ALL/;
      use warnings;

      # Open IE at address "http://search.cpan.org/" before running

      my @ActWin = FindWindowLike(0,"search.cpan.org: The CPAN Search Site -
      Microsoft Internet Explorer","IEFrame");
      print "Found windows: @ActWin\n";
      my @w = FindWindowLike($ActWin[0],undef,"Internet
      Explorer_TridentCmboBx");
      print "Found Combo boxes: @w\n";
      my $res = SelComboItemText($w[0],"Modules"); #Select the item we want
      print "did it work ? $res\n";
      my $toplistitem = GetComboText($w[0],0);
      print "What is top $toplistitem\n";
      my @combolist = GetComboContents($w[0]);
      print "The full combo list @combolist\n";

      ----

      When I run the above script, I get the following output (probably
      won't reproduce 100% here, due to weird characters):

      Found windows: 1180638
      Found Combo boxes: 1442710
      did it work ? 0
      What is top dε╚☺
      The full combo list dε╚☺ äε╚☺ ñε╚☺ ─ε╚☺


      Hope this is of use.

      David



      --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@p...>
      wrote:
      > Could you be more specific on problems you have?
      > Can you provide detailed instructions on how to recreate the
      problem?
      >
      > -Piotr
      >
      > --- In perlguitest@yahoogroups.com, "rmqa_group" <rmqa_group@y...>
      > wrote:
      > > I'm not sure you are doing anything wrong. I'm also having
      problems
      > > getting anything meaningful from these IE combo boxes - just get
      > what
      > > appears to be an address.
      > >
      > > The function to select combo items using their text value is also
      > > driving me nuts. I can select them OK with an index value, but
      not
      > > text.
      > >
      > > If someone can help out here, it would be appreciated.
      > >
      > > Thanks
      > > David.
      > >
      > > --- In perlguitest@yahoogroups.com, "fredmilano" <fmilano@a...>
      > wrote:
      > > > I am trying to retrieve the values available on a web page in
      > this
      > > > type of combo box. Whenever I try, I get very strange results.
      > Here
      > > > is what I tried:
      > > >
      > > > use warnings;
      > > >
      > > > use Win32::GuiTest qw(:ALL);
      > > >
      > > > $Win32::GuiTest::debug = 0; # "0" => off, "1" => on
      > > >
      > > > my @windows = FindWindowLike(0, "enc3home.html",0);
      > > > my $firstWindow = $windows[0];
      > > > print "Main Window = ",GetWindowText($firstWindow), "\n";
      > > > #print "Foreground = ",SetForegroundWindow
      > ($firstWindow), "\n";
      > > >
      > > > my @comboBoxes = ();
      > > > @comboBoxes = FindWindowLike($firstWindow, "", "^Internet
      > > > Explorer_TridentCmboBx");
      > > > #@comboBoxes = FindWindowLike($firstWindow, "", 0);
      > > > die "No CBs found" unless @comboBoxes;
      > > >
      > > > for (@comboBoxes) {
      > > > print "$_ \t|", GetWindowText($_), "\t|", GetClassName
      > ($_), "\n";
      > > > print "Combo Text = ", GetComboText($_,0), "\n";
      > > > }
      > > >
      > > > The results that I get are:
      > > >
      > > > Main Window = http://nc3ft3.ugd.att.com/enc3home.html -
      Microsoft
      > > > Internet Explorer
      > > >
      > > > 67704 | |Internet Explorer_TridentCmboBx
      > > > Combo Text = ô-
      > > >
      > > > 133232 | |Internet Explorer_TridentCmboBx
      > > > Combo Text = ¤
      > > >
      > > > Any idea about what I might be doing wrong here?
    • Gábor Szabó
      ... Have you tried Win32::IE::Mechanize for this ? Gabor
      Message 2 of 7 , Aug 18, 2005
        On 8/17/05, rmqa_group <rmqa_group@...> wrote:
        >
        > # Open IE at address "http://search.cpan.org/" before running

        Have you tried Win32::IE::Mechanize for this ?

        Gabor
      • rmqa_group
        ... Yes, again without much success. $ie- select() doesn t seem to work either :(
        Message 3 of 7 , Aug 23, 2005
          --- In perlguitest@yahoogroups.com, Gábor Szabó <szabgab@g...>
          wrote:
          > On 8/17/05, rmqa_group <rmqa_group@y...> wrote:
          > >
          > > # Open IE at address "http://search.cpan.org/" before running
          >
          > Have you tried Win32::IE::Mechanize for this ?
          >
          > Gabor

          Yes, again without much success.

          $ie->select() doesn't seem to work either :(
        Your message has been successfully submitted and would be delivered to recipients shortly.