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

1570Re: [perlguitest] Re: Is it possible to click on a button based on button's name in the UI?

Expand Messages
  • yaswanth kumar
    Oct 16, 2006
    • 0 Attachment
      Hi nice to ur reply...
      may be ur not clear about what i wanted...
      let me give an example..
      i have search screen with buttons.....go....clear....enter.....some buttons.....etc...
      now i want to click on enter button without using tab functionality.....
      Hope ur clear now....
      Please let me know........if u have a solution...
      thanks....

      baiyang1 <baiyang1@...> wrote:
      Is it your want?

      #!/usr/bin/perl -w
      use Win32::GuiTest qw ( :ALL);
      use warnings;

      use strict;
      system "start http://www.Mynewplace.com";
      sleep(1);
      my @mnp = FindWindowLike(undef,'MyNewPlace');

      if (!@mnp)
      {
      die "cann't open the mynewplace page\n";
      }
      else
      {
      printf ("Mynewplace handle control id is %x\n ", $mnp[0]);
      }

      SetForegroundWindow($mnp[0]);

      #MouseMoveAbsPix(480,300);
      SendKeys( 'New york');
      SendKeys( "{TAB}~");
      sleep 10; # "10" is the time you want waiting for loading image,and
      you can change it.
      #SendMouse("{LeftClick}");

      --- In perlguitest@yahoogroups.com, "kumar21yash" <kumar21yash@...>
      wrote:
      >
      > Take a screen shot and paste it in the mspaint.
      > Point the Button or anything using mouse and find the co ordinates
      > in the progress bar.......
      >
      > But we need to find a general solution for this.......
      >
      > KEep posting......
      >
      > Thanks......
      > Yash....
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > --- In perlguitest@yahoogroups.com, "kumar21yash" <kumar21yash@>
      > wrote:
      > >
      > > Hi,
      > > im trying to click on a button called Go. i could able do this
      > with
      > > the following code...
      > >
      > > use Win32::GuiTest qw ( :ALL);
      > > use warnings;
      > >
      > > use strict;
      > > system "start http://www.Mynewplace.com";
      > > sleep(1);
      > > my @mnp = FindWindowLike(undef,'MyNewPlace');
      > >
      > > if (!@mnp)
      > > {
      > > die "cann't open the mynewplace page\n";
      > > }
      > > else
      > > {
      > > printf ("Mynewplace handle control id is %x\n ", $mnp[0]);
      > > }
      > >
      > > SetForegroundWindow($mnp[0]);
      > >
      > > MouseMoveAbsPix(480,300);
      > > SendKeys( 'New york');
      > > SendMouse("{LeftClick}");
      > >
      > > *******is there any other way to click on Go button?
      > >
      > > *******and also after clicking Go button i want my code to wait
      > for
      > > sometime so that it uploads all the images...etc....
      > >
      > > Thanks...
      > > yash
      > >
      >






      Yaswanth Kumar T


      ---------------------------------
      Find out what India is talking about on - Yahoo! Answers India
      Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW

      [Non-text portions of this message have been removed]
    • Show all 6 messages in this topic