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

Re: [perlguitest] Using Win32::Guitest 1.50.5 to Automate Internet Explorer application

Expand Messages
  • Shanmuhanathan T
    Lee, Maybe Win32::Guitest is not the straight fit web application UI testing. you can have a look at selenium, which IMHO is quite good for web application
    Message 1 of 7 , Aug 10, 2006
    • 0 Attachment
      Lee,
      Maybe Win32::Guitest is not the straight fit web application
      UI testing.
      you can have a look at selenium, which IMHO is quite
      good for web application testing.
      http://www.openqa.org/selenium/

      Regards,
      Shanmu.

      On 8/11/06, lmarlin <lmarlin@...> wrote:
      >
      > Dear Masters of Win32::Guitest (1.50.5)
      >
      > I am using Win32::Guitest to automate a tedious point-and-click
      > process that I do repeatedly with Internet Explorer.
      >
      > I am able to get the window handle, select a tab, navigate via
      > SendKey to the right spot and paste info where I want it, then use
      > SendKey to move to a listbox control.
      >
      > I am able to navigate by SendKey, and highlight the item in the list
      > that I want ( shows as selected by changing color).
      >
      > When I
      >
      > SendMouse ({LeftClick})
      >
      > nothing happens.
      >
      > By using WinSpy++ I found that the ListBox is identified as:
      >
      > Caption: None
      > Class: Internet Explorer_TridentLstBox
      > Handle: 00340518
      >
      > Is there a superior way to access and manipulate / click on / select
      > the desired list element?
      >
      > use Win32::GuiTest qw(:ALL :SW :FUNC
      > FindWindowLike SetForegroundWindow
      > SendMouse MouseMoveAbsPix SendLButtonDown SendLButtonUp
      > );
      >
      > Lee
      >
      >
      >


      [Non-text portions of this message have been removed]
    • Martin McGrath
      Lee, I am a believer of the right tool for the right job . That being said, my advice does not have anything to do with Win32::GuiTest. I usually automate IE
      Message 2 of 7 , Aug 11, 2006
      • 0 Attachment
        Lee,

        I am a believer of "the right tool for the right job". That being said, my advice does not have anything to do with Win32::GuiTest. I usually automate IE using the module Win32::IE::Mechanize , which is does pretty much the same thing as WWW::Mechanize using Win32::OLE. Automating form submission with your desired values would be a snap.

        Cheers

        Martin

        lmarlin <lmarlin@...> wrote:
        Dear Masters of Win32::Guitest (1.50.5)

        I am using Win32::Guitest to automate a tedious point-and-click
        process that I do repeatedly with Internet Explorer.

        I am able to get the window handle, select a tab, navigate via
        SendKey to the right spot and paste info where I want it, then use
        SendKey to move to a listbox control.

        I am able to navigate by SendKey, and highlight the item in the list
        that I want ( shows as selected by changing color).

        When I

        SendMouse ({LeftClick})

        nothing happens.

        By using WinSpy++ I found that the ListBox is identified as:

        Caption: None
        Class: Internet Explorer_TridentLstBox
        Handle: 00340518

        Is there a superior way to access and manipulate / click on / select
        the desired list element?

        use Win32::GuiTest qw(:ALL :SW :FUNC
        FindWindowLike SetForegroundWindow
        SendMouse MouseMoveAbsPix SendLButtonDown SendLButtonUp
        );

        Lee






        ---------------------------------
        Try the all-new Yahoo! Mail . "The New Version is radically easier to use" – The Wall Street Journal

        [Non-text portions of this message have been removed]
      • negedi
        SendMouse ({LeftClick}) - this will send mouse click to the current cordinates of mouse pinter. Not to the KB focus. Are you sure that Mouse points to the
        Message 3 of 7 , Aug 11, 2006
        • 0 Attachment
          SendMouse ({LeftClick}) - this will send mouse click to the current
          cordinates of mouse pinter. Not to the KB focus. Are you sure that
          Mouse points to the selected Item?

          Try to find way to prcess with KB ... Enter, SpaceBar ...

          You can use other tools designed for automating IE:
          SAMIE - Perl
          PAMIE - Python
          WATIR - Ruby


          --- In perlguitest@yahoogroups.com, "lmarlin" <lmarlin@...> wrote:
          >
          > Dear Masters of Win32::Guitest (1.50.5)
          >
          >
          > I am using Win32::Guitest to automate a tedious point-and-click
          > process that I do repeatedly with Internet Explorer.
          >
          > I am able to get the window handle, select a tab, navigate via
          > SendKey to the right spot and paste info where I want it, then use
          > SendKey to move to a listbox control.
          >
          > I am able to navigate by SendKey, and highlight the item in the
          list
          > that I want ( shows as selected by changing color).
          >
          > When I
          >
          > SendMouse ({LeftClick})
          >
          > nothing happens.
          >
          > By using WinSpy++ I found that the ListBox is identified as:
          >
          > Caption: None
          > Class: Internet Explorer_TridentLstBox
          > Handle: 00340518
          >
          > Is there a superior way to access and manipulate / click on /
          select
          > the desired list element?
          >
          >
          >
          > use Win32::GuiTest qw(:ALL :SW :FUNC
          > FindWindowLike SetForegroundWindow
          > SendMouse MouseMoveAbsPix SendLButtonDown SendLButtonUp
          > );
          >
          >
          > Lee
          >
        • Chris Hilton
          If you don t go with one of the other excellent suggestions offered earlier, I would ask whether you ve moved the mouse to the correct location before using
          Message 4 of 7 , Aug 11, 2006
          • 0 Attachment
            If you don't go with one of the other excellent suggestions offered
            earlier, I would ask whether you've moved the mouse to the correct
            location before using SendMouse? SendMouse({LeftClick}) will send a
            left-mouse click at the current mouse coordinates, so you would need to
            do something like:

            1. Get the coordinates of the window you want to click on. I don't
            recall how offhand, but it should be relatively easy to research.
            2. Use MouseMoveAbsPix to move the mouse within the window area.
            3. Then use SendMouse({LeftClick}).

            Chris


            ________________________________

            From: perlguitest@yahoogroups.com
            [mailto:perlguitest@yahoogroups.com] On Behalf Of lmarlin
            Sent: Thursday, 10 August, 2006 15:00
            To: perlguitest@yahoogroups.com
            Subject: [perlguitest] Using Win32::Guitest 1.50.5 to Automate
            Internet Explorer application



            Dear Masters of Win32::Guitest (1.50.5)

            I am using Win32::Guitest to automate a tedious point-and-click
            process that I do repeatedly with Internet Explorer.

            I am able to get the window handle, select a tab, navigate via
            SendKey to the right spot and paste info where I want it, then
            use
            SendKey to move to a listbox control.

            I am able to navigate by SendKey, and highlight the item in the
            list
            that I want ( shows as selected by changing color).

            When I

            SendMouse ({LeftClick})

            nothing happens.

            By using WinSpy++ I found that the ListBox is identified as:

            Caption: None
            Class: Internet Explorer_TridentLstBox
            Handle: 00340518

            Is there a superior way to access and manipulate / click on /
            select
            the desired list element?

            use Win32::GuiTest qw(:ALL :SW :FUNC
            FindWindowLike SetForegroundWindow
            SendMouse MouseMoveAbsPix SendLButtonDown SendLButtonUp
            );

            Lee







            [Non-text portions of this message have been removed]
          • lmarlin
            Chris, You are exactly right. I blundered onto a solution about 1:00am. Namely, I added: my ($left, $top, $right, $bottom) = GetWindowRect($hwnd);
            Message 5 of 7 , Aug 11, 2006
            • 0 Attachment
              Chris,

              You are exactly right. I blundered onto a solution about 1:00am.
              Namely, I added:

              my ($left, $top, $right, $bottom) = GetWindowRect($hwnd);

              MouseMoveAbsPix(($right+$left)/2,($top + 5)); # Just a nudge from
              the top line of the list of reports

              SendMouse("{LeftClick}");

              (because I knew that the item I wanted was highlighted/selected and
              that it was the first "item from the top", I just nudged the $top
              coordinate for the cursor, sent the leftclick to the mouse, and it
              worked.


              Thanks to all for the excellent suggestions for better tools.








              --- In perlguitest@yahoogroups.com, "Chris Hilton" <chilton@...>
              wrote:
              >
              > If you don't go with one of the other excellent suggestions offered
              > earlier, I would ask whether you've moved the mouse to the correct
              > location before using SendMouse? SendMouse({LeftClick}) will send a
              > left-mouse click at the current mouse coordinates, so you would
              need to
              > do something like:
              >
              > 1. Get the coordinates of the window you want to click on. I don't
              > recall how offhand, but it should be relatively easy to research.
              > 2. Use MouseMoveAbsPix to move the mouse within the window area.
              > 3. Then use SendMouse({LeftClick}).
              >
              > Chris
              >
              >
              > ________________________________
              >
              > From: perlguitest@yahoogroups.com
              > [mailto:perlguitest@yahoogroups.com] On Behalf Of lmarlin
              > Sent: Thursday, 10 August, 2006 15:00
              > To: perlguitest@yahoogroups.com
              > Subject: [perlguitest] Using Win32::Guitest 1.50.5 to
              Automate
              > Internet Explorer application
              >
              >
              >
              > Dear Masters of Win32::Guitest (1.50.5)
              >
              > I am using Win32::Guitest to automate a tedious point-and-
              click
              > process that I do repeatedly with Internet Explorer.
              >
              > I am able to get the window handle, select a tab, navigate
              via
              > SendKey to the right spot and paste info where I want it,
              then
              > use
              > SendKey to move to a listbox control.
              >
              > I am able to navigate by SendKey, and highlight the item in
              the
              > list
              > that I want ( shows as selected by changing color).
              >
              > When I
              >
              > SendMouse ({LeftClick})
              >
              > nothing happens.
              >
              > By using WinSpy++ I found that the ListBox is identified as:
              >
              > Caption: None
              > Class: Internet Explorer_TridentLstBox
              > Handle: 00340518
              >
              > Is there a superior way to access and manipulate / click on /
              > select
              > the desired list element?
              >
              > use Win32::GuiTest qw(:ALL :SW :FUNC
              > FindWindowLike SetForegroundWindow
              > SendMouse MouseMoveAbsPix SendLButtonDown SendLButtonUp
              > );
              >
              > Lee
              >
              >
              >
              >
              >
              >
              >
              > [Non-text portions of this message have been removed]
              >
            • jivy lucero
              hi all, only i can suggest is use Win32-IEAutomation to automate IE. This module good than clicking the mouse location, because Win32- IEAutomation can click
              Message 6 of 7 , Aug 12, 2006
              • 0 Attachment
                hi all,
                only i can suggest is use Win32-IEAutomation to automate IE. This
                module good than clicking the mouse location, because Win32-
                IEAutomation can click exactly were the object is located. or import
                AutoItX.dll for more easy gui automation

                Use AutoIT Script for GUI automation.
                http://www.autoitscript.com/autoit3/downloads.php

                regards,
                jivy

                --- In perlguitest@yahoogroups.com, "negedi" <neven.dinev@...> wrote:
                >
                > SendMouse ({LeftClick}) - this will send mouse click to the current
                > cordinates of mouse pinter. Not to the KB focus. Are you sure that
                > Mouse points to the selected Item?
                >
                > Try to find way to prcess with KB ... Enter, SpaceBar ...
                >
                > You can use other tools designed for automating IE:
                > SAMIE - Perl
                > PAMIE - Python
                > WATIR - Ruby
                >
                >
                > --- In perlguitest@yahoogroups.com, "lmarlin" <lmarlin@> wrote:
                > >
                > > Dear Masters of Win32::Guitest (1.50.5)
                > >
                > >
                > > I am using Win32::Guitest to automate a tedious point-and-click
                > > process that I do repeatedly with Internet Explorer.
                > >
                > > I am able to get the window handle, select a tab, navigate via
                > > SendKey to the right spot and paste info where I want it, then
                use
                > > SendKey to move to a listbox control.
                > >
                > > I am able to navigate by SendKey, and highlight the item in the
                > list
                > > that I want ( shows as selected by changing color).
                > >
                > > When I
                > >
                > > SendMouse ({LeftClick})
                > >
                > > nothing happens.
                > >
                > > By using WinSpy++ I found that the ListBox is identified as:
                > >
                > > Caption: None
                > > Class: Internet Explorer_TridentLstBox
                > > Handle: 00340518
                > >
                > > Is there a superior way to access and manipulate / click on /
                > select
                > > the desired list element?
                > >
                > >
                > >
                > > use Win32::GuiTest qw(:ALL :SW :FUNC
                > > FindWindowLike SetForegroundWindow
                > > SendMouse MouseMoveAbsPix SendLButtonDown SendLButtonUp
                > > );
                > >
                > >
                > > Lee
                > >
                >
              Your message has been successfully submitted and would be delivered to recipients shortly.