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

986GetComboBox on InternetExplorer_TridentCmboBx

Expand Messages
  • fredmilano
    Aug 10, 2005
    • 0 Attachment
      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?
    • Show all 7 messages in this topic