Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

perlguitest · Win32::GuiTest (Perl)

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 2444
  • Category: Perl
  • Founded: Jul 25, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 1288 - 1317 of 1818   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#1288 From: Alex Morozov <inductor2000@...>
Date: Wed Feb 1, 2006 1:42 pm
Subject: Finding controls on a form - easily.
inductor1975
Send Email Send Email
 
Hi all.

Just want to share my "experience" in finding controls on forms. Usually
it`s a boring task, especially when controls has no titles. You have to
inspect a form, get control`s class ID (TComboBox, f.e.), call
FindWindowLike and guess control`s index in array, returned by that
function. Grrr. Before sticking with GuiTest, I`ve used AutoIt, which
have excellent (IMHO) thing: every control on a form has not only class
ID, but class ID + control`s index on a form (which stays constant
between program restarts). So, using AU3Info.exe from AutoIt and simple
function like that below, you can easily find controls within your
script. Just look up ClassnameNN, using AU3Info, and then call
FindWindowNN ($parent, undef, 'TComboBox1');. Voila.

However, there will be problems if class has digits in it`s name. Though
I haven`t faced such classes.

Here`s the sub. It returns control HWND.

sub FindWindowNN {
     my ($parent, $title, $class) = @_;
     $class =~ /([a-zA-Z]+)(\d+)/;
     my @win = FindWindowLike ($parent, $title, $1);
     $win[$2-1]||undef;
}

PS: Please, correct me, if there is more easy way to do the job.
PPS: Sorry for my English. Hope you`ll understand my post ).

#1289 From: "Ambat, Gopakumar (STSD)" <gopakumar.ambat@...>
Date: Fri Feb 3, 2006 12:36 pm
Subject: Newbie to perl GUI test
wastebugger
Send Email Send Email
 
Hi,
I have a MFC based app for which I plan to do some test automation. My
app uses Perl internally (links perl58.dll and uses a bunch of XS
interfaces), so I was delighted when I read about doing automation using
Perl. I read the documentation (partly), and wanted to know if I could
use GUI test to automate an MFC app which in turn uses Perl..

Please advice on whether GUI test would be the right tool to use in my
scenario.

Thanks,
Gopa

#1290 From: "Piotr Kaluski" <pkaluski@...>
Date: Fri Feb 3, 2006 1:07 pm
Subject: Re: Newbie to perl GUI test
pkaluski
Send Email Send Email
 
GUI automation operates on standard window controls - edit boxes,
combos and so on. It does not care what is the language of the
application, which hosts them. MFC uses those standard controls. So
you should be fine, unless you create some custom, specific window
controls.

--Piotr


--- In perlguitest@yahoogroups.com, "Ambat, Gopakumar (STSD)"
<gopakumar.ambat@...> wrote:
>
> Hi,
> I have a MFC based app for which I plan to do some test automation. My
> app uses Perl internally (links perl58.dll and uses a bunch of XS
> interfaces), so I was delighted when I read about doing automation using
> Perl. I read the documentation (partly), and wanted to know if I could
> use GUI test to automate an MFC app which in turn uses Perl..
>
> Please advice on whether GUI test would be the right tool to use in my
> scenario.
>
> Thanks,
> Gopa
>

#1291 From: Agnishwar Karmakar <agni_karmakar@...>
Date: Fri Feb 3, 2006 2:27 pm
Subject: Handle of a window with no caption and fetching text
agni_karmakar
Send Email Send Email
 
Hi,

I am new to perl Win32 GUI test. It will be of great
help if some one provide me some pointer on this.

I am using GUI test to automate test cases for an C++
based application. I am unable to fetch text from a
edit control box. This Edit box is a child of an
parent window. I observed that WinSpy does not show
any caption either for parent window or for the child
edit box control. Now how do I get the handle for
child edit box control when I don't know the window
caption for both the parent and child? My intention is
to pass the child handle in WMGetText to fetch the
text in the control.

More precisely, Can some one help me how to get handle
of window when Winspy does not show any caption for
that window?

Is there any other function to fetch text from a
control like edit box?

Thanks in advance.
Regards,
Agnishwar

--- "Ambat, Gopakumar (STSD)" <gopakumar.ambat@...>
wrote:

> Hi,
> I have a MFC based app for which I plan to do some
> test automation. My
> app uses Perl internally (links perl58.dll and uses
> a bunch of XS
> interfaces), so I was delighted when I read about
> doing automation using
> Perl. I read the documentation (partly), and wanted
> to know if I could
> use GUI test to automate an MFC app which in turn
> uses Perl..
>
> Please advice on whether GUI test would be the right
> tool to use in my
> scenario.
>
> Thanks,
> Gopa
>
>
>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#1292 From: Dave Miller <dave@...>
Date: Mon Feb 6, 2006 8:49 pm
Subject: Sending keystrokes with SendMessage
drm_wa
Send Email Send Email
 
Looking through the archives, I found one thread about this, but it died out
before a solution came up, so I'm going to try fresh.

I'm trying to send keystrokes to a window that I can't be certain has focus.
SendMessage (or, optionally, PostMessage, I've tried both) looks like the
way to go, but I've had no luck so far.  I whipped up some test code using
the calculator (mostly plagiarized from one of those old posts) and all the
function returns act like they're working, but nothing seems to happen (I'm
not even dealing with the "no focus" thing right now, I'm just trying to get
the message sent and received):

###################################
use strict;
use Win32::GuiTest qw(FindWindowLike SendMessage SetForegroundWindow ) ;

use constant WM_KEYDOWN => 0x0100;
use constant WM_KEYUP => 0x0101;
use constant WM_CHAR => 0x0102;
use constant KEY_4 => 0x34;

my ($hwnd) = FindWindowLike(0, "Calculator");
print "hwnd = $hwnd\n";
SetForegroundWindow($hwnd);
sleep 1;

my $test = SendMessage( $hwnd, WM_KEYDOWN, KEY_4, 0x00050001 );
print "test = $test\n";
my $test2 = SendMessage( $hwnd, WM_CHAR, KEY_4, 0x40050001 );
print "test2 = $test2\n";
my $test3 = SendMessage( $hwnd, WM_KEYUP, KEY_4, 0xC0050001 );
print "test3 = $test3\n";
###################################

If anyone has some ideas that even get me moving in the right direction, it
would be most appreciated.

#1293 From: "Piotr Kaluski" <pkaluski@...>
Date: Tue Feb 7, 2006 8:45 pm
Subject: Re: Sending keystrokes with SendMessage
pkaluski
Send Email Send Email
 
Ok.
I think I know the answer to your question. I am not sure that I am
right but my experiments and Petzold seem to confirm it. I will give
you an elaborate answer, to show you how did I figure it out.

Firstly, of course, I tried your script on my PC. And yes, it did not
work.

Then I run Winspector and set message filtering to show only
WM_KEYDOWN, WM_CHAR and WM_KEYUP. I checked that messages really
arrive to calculator window. But there was not effect on calculator's
display.
Then I checked what messages are send to calculator when I actually
press '4'. It has occurred that calculator receives 2 messages -
WM_KEYDOWN and WM_CHAR. No WM_KEYUP.
I also checked what is the messages' lParam. I have also noticed those
messages are posted, not sent (PostMessage).
So I tried PostMessage:

my $test = PostMessage( $hwnd, WM_KEYDOWN, KEY_4, 0x00050001 );
print "test = $test\n";
my $test2 = PostMessage( $hwnd, WM_CHAR, KEY_4, 0x00050001 );

The result was better, but still not exactly as expected. Calculator
reacted, but twice.
Instead of displaying one "4" character it displayed "44". Winspector
clearly showed that calculator is getting WM_CHAR twice.
So I started reading Petzold. And I found in chapter 6 "The Keyboard",
section "Character Messages". It says something like:

"
(...)
while (GetMessage (&msg, NULL, 0, 0))
{
      TranslateMessage (&msg) ;
      DispatchMessage (&msg) ;
}

This is a typical message loop that appears in WinMain. The GetMessage
function fills in the msg structure fields with the next message from
the queue. DispatchMessage calls the appropriate window procedure with
this message.

Between these two functions is TranslateMessage, which takes on the
responsibility of translating keystroke messages to character
messages. If the keystroke message is WM_KEYDOWN or WM_SYSKEYDOWN, and
if the keystroke in combination with the shift state produces a
character, TranslateMessage places a character message in the message
queue. This character message will be the next message that GetMessage
retrieves from the queue after the keystroke message.
"
END OF QUOTE

So it is enough to post only one WM_KEYDOWN. Calculator will translate
it to WM_CHAR and will post it to itself.

Why there is no WM_KEYUP? I am under impression that after getting
first WM_KEYDOWN, calculator moves focus to an edit box. Edit box seem
to catch all further keyboard events. Pressing "4" many times causes
calcultor's main window to receive only one WM_CHAR messages. The
remaining ones are send to Edit box.

--Piotr


--- In perlguitest@yahoogroups.com, Dave Miller <dave@...> wrote:
>
> Looking through the archives, I found one thread about this, but it
died out
> before a solution came up, so I'm going to try fresh.
>
> I'm trying to send keystrokes to a window that I can't be certain
has focus.
> SendMessage (or, optionally, PostMessage, I've tried both) looks
like the
> way to go, but I've had no luck so far.  I whipped up some test code
using
> the calculator (mostly plagiarized from one of those old posts) and
all the
> function returns act like they're working, but nothing seems to
happen (I'm
> not even dealing with the "no focus" thing right now, I'm just
trying to get
> the message sent and received):
>
> ###################################
> use strict;
> use Win32::GuiTest qw(FindWindowLike SendMessage SetForegroundWindow ) ;
>
> use constant WM_KEYDOWN => 0x0100;
> use constant WM_KEYUP => 0x0101;
> use constant WM_CHAR => 0x0102;
> use constant KEY_4 => 0x34;
>
> my ($hwnd) = FindWindowLike(0, "Calculator");
> print "hwnd = $hwnd\n";
> SetForegroundWindow($hwnd);
> sleep 1;
>
> my $test = SendMessage( $hwnd, WM_KEYDOWN, KEY_4, 0x00050001 );
> print "test = $test\n";
> my $test2 = SendMessage( $hwnd, WM_CHAR, KEY_4, 0x40050001 );
> print "test2 = $test2\n";
> my $test3 = SendMessage( $hwnd, WM_KEYUP, KEY_4, 0xC0050001 );
> print "test3 = $test3\n";
> ###################################
>
> If anyone has some ideas that even get me moving in the right
direction, it
> would be most appreciated.
>

#1294 From: "santoshkadli" <kadlisantosh@...>
Date: Mon Feb 13, 2006 5:20 am
Subject: Unable to check Radio button.
santoshkadli
Send Email Send Email
 
I am trying to set the RadioButton using CheckButton($ChkBoxHdl),
I am able to get the Radio button status by,
--
my $ChkBoxHdl = FindWindowLike(0, $ChkBoxName, "" );
IsCheckedButton( $ChkBoxHdl);
--
#But unable to set the Radio button, using
CheckButton($ChkBoxHdl);

Same set of statements work for Check box. But not for Radio Button.
Can some body help me please.
Thanks,
Santosh

#1295 From: "ep_perl" <ep_perl@...>
Date: Thu Feb 16, 2006 2:20 am
Subject: Retrieving text from a LCD display
ep_perl
Send Email Send Email
 
Hi,

I need help reading the text from a display window.  The application
was created with MFC.  There is a child window called LCD.  This child
window, LCD, has messages "painted" to it.  I am trying to get the text
of the message on this window.

WinSpy recognizes the child window but does not recognize the text
within this window.  When I use GetWindowText or WMGetText using the
handle of the child window, it returns nothing.

The child window contains a cpaintdc object where the messages are
stored and then used with a MFC method to display it on the LCD, child
window.

Any suggestions on retrieving text that is displayed onto a child
window with a cpaintdc object?

Thank you.

#1296 From: "Tim Mitchell" <maxquig@...>
Date: Wed Feb 8, 2006 5:45 pm
Subject: Select Item in Listbox
tmaxquig
Send Email Send Email
 
Hi everyone,

I have just recently installed Win32-GuiTest on my computer at work. I
plan to use Perl and Win32-GuiTest as the basis for running scripts to
automate tseting of our software that we write and market. I seem to
have quickly run into a fatal flaw in GuiTest. There is no function to
select an item from a Listbox. Without this function I am afraid that
I will have to just give up the whole idea. Maybe there are other
missing functions as well.

Does anyone know of a way to do do this?

#1297 From: "Piotr Kaluski" <pkaluski@...>
Date: Sun Feb 19, 2006 11:57 am
Subject: Few comments and requests
pkaluski
Send Email Send Email
 
Hi,
Posting policy has never been explicitly formulated here, so I thought
that maybe some basic guidelines should be given.

1. Before you post please check old posts. There are some really basic
but important questions, which has been answered many times.

2. It's my fault, that the group is not moderated efficiently.
Therefore there are some delays in having your posts come through. I
apologize for it and will pay more attention to accept messages
quickly. Please DO NOT send you questions directly to me. Always post
your questions to this group. I am following what's going on in this
group and if I don't answer posts, which are posted there that means
that I don't have time to do it. So I also don't have time to answer
you questions sent directly to me.

3. Please do not send job offers.

4. Please avoid sending emails like "Urgent please help, my scripts
don't work <and here the post ends>". Always provide details of what
has gone wrong. Provide code snippets. There are many people around,
which would be happy to help, but they won't help you if you don't
give them enough details.

--Piotr

#1298 From: "Piotr Kaluski" <pkaluski@...>
Date: Sun Feb 19, 2006 12:04 pm
Subject: Re: Select Item in Listbox
pkaluski
Send Email Send Email
 
You are right, it is not there.
Win32::GuiTest does not have a full coverage of all operations for all
common controls. So you may find more missing functionalities, which
are seen as natural.
If you have some programming skills have a look at guitest.xs file.
Programming some basic operations for common controls is pretty
straightforward.
As for now you can work around this problem using SendKeys. I agree it
is not the most elegant solution, but it works.

--Piotr


--- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@...> wrote:
>
> Hi everyone,
>
> I have just recently installed Win32-GuiTest on my computer at work. I
> plan to use Perl and Win32-GuiTest as the basis for running scripts to
> automate tseting of our software that we write and market. I seem to
> have quickly run into a fatal flaw in GuiTest. There is no function to
> select an item from a Listbox. Without this function I am afraid that
> I will have to just give up the whole idea. Maybe there are other
> missing functions as well.
>
> Does anyone know of a way to do do this?
>

#1299 From: "V. Ramamurthy" <vrama1970@...>
Date: Thu Feb 23, 2006 12:59 pm
Subject: Excel/Word reading
vrama1970
Send Email Send Email
 
Hi
   Is there any inbuild function in Win32:guitest for read the data in excel/word
or i should use Win32:OLE

   Thanks

   Ram


---------------------------------
  Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.

[Non-text portions of this message have been removed]

#1300 From: "brentje" <brentje@...>
Date: Thu Feb 23, 2006 4:11 pm
Subject: Re: Select Item in Listbox
brentje
Send Email Send Email
 
Yup...that's something that I discovered after I started using
GuiTest.  Not hard to do in yor script if you have the listbox's
handle, but it would be nice to build into the .XS file eventually as
Piotr mentioned.  In the meantime, here's what I came up with.  Keep
in mind that I prefer to do as much as possible with mouse clicks to
simulate a user as closely as possible.  There are other ways to write
this out, but you'll still have to use the SendMessage and pack/unpack
commands in any case.

You can read more on GuiTest's SendMessage command at:
http://www.piotrkaluski.com/files/winguitest/docs/ch09s74.html
For the pack/unpack commands, see:
http://www.perl.com/doc/manual/html/pod/perlfunc/pack.html
and
http://www.perl.com/doc/manual/html/pod/perlfunc/unpack.html
For Microsoft's standard control reference for Listboxes, visit:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor\
m/commctls/listboxes/listboxes.asp

sub SetListboxValue
{
     my $H_ListBox   = shift;
     my $s_FieldValue = shift;

     my $i_Index;

     my $S_SearchBuffer;
     my $p_Search;

#Create a C compliant variable that ends with a null character
#for the search, and send the LB_SELECTSTRING message to the
#field.  The value of LB_SELECTSTRING is 0x018C.  This will
#highlight the item you're looking for, and bring it into view
#if it's not currently visible.  Note that this does NOT cause
#any events to fire, so if there is an OnClick event for the
#listbox you'll have to manually click that item before anything #happens.
     $s_FieldValue = $s_FieldValue . "\0";
     $S_SearchBuffer = pack( 'P', $s_FieldValue );
     $p_Search = unpack( 'L!', $S_SearchBuffer );
     $i_Index = SendMessage( $H_ListBox, LB_SELECTSTRING(), -1,
$p_Search );

     if($i_Index < 0)
     {
         return 0;
     }

     undef $S_SearchBuffer;
     undef $p_Search;


#Re-use the SearchBuffer to hold the coordinates of the item.
     $S_SearchBuffer = pack( "LLLL",
         0,
         0,
         0,
         0,
     );

     $p_Search = unpack( 'L!', pack( 'P', $S_SearchBuffer ) );

#Get the items's coordinates.  The value of LB_GETITEMRECT is 0x0198.
     if(SendMessage( $H_ListBox, LB_GETITEMRECT , $i_Index, $p_Search )
> -1)
     {
         my ($i_LeftX, $i_TopY, $i_RightX, $i_BottomY) = unpack(
'LLLL', $S_SearchBuffer );

#Find the middle of the item, convert to absolute screen coordinates,
#and click on the item.
         my $i_ClientX = $i_LeftX + (int(($i_RightX - $i_LeftX)/2));
         my $i_ClientY = $i_TopY + (int(($i_BottomY - $i_TopY)/2));

         my ($i_X, $i_Y) = ClientToScreen( $H_ListBox, $i_ClientX,
$i_ClientY );

         MouseMoveAbsPix($i_X, $i_Y);
         SendMouse('{LEFTCLICK}');
     }

     return 1;
}


This should give you a good start for selecting listbox items.  Keep
in mind there's lot of information out there, and that it would
probably be good to write it into the .XS file if you have the time
and energy.

Brent



--- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@...> wrote:
>
> Hi everyone,
>
> I have just recently installed Win32-GuiTest on my computer at work. I
> plan to use Perl and Win32-GuiTest as the basis for running scripts to
> automate tseting of our software that we write and market. I seem to
> have quickly run into a fatal flaw in GuiTest. There is no function to
> select an item from a Listbox. Without this function I am afraid that
> I will have to just give up the whole idea. Maybe there are other
> missing functions as well.
>
> Does anyone know of a way to do do this?
>

#1301 From: Timothy Mitchell <maxquig@...>
Date: Thu Feb 23, 2006 5:27 pm
Subject: Re: Re: Select Item in Listbox
tmaxquig
Send Email Send Email
 
Thanks for the reply. I did it like this, putting the subroutines in a seperate
module for reuse. "Select item" is the title of a test dialog that has alistbox.

     SelectItem( "test" );

   sub SelectItem {
   my $item = shift;
   my @itemlist;
   my @selectitemID;
   #Wait for the dialog with the listbox to appear.
   sleep 1;
   @selectitemID = FindWindowLike( undef, "Select item", "" );
   SetFocus($selectitemID[0]);
   @itemlist = FindWindowLike(undef, undef, "ListBox");
   selListboxItem($item, $itemlist[0]);
   }

   sub selListboxItem {
   my $selection = shift;
   my $lb = shift;
   #0x018C is the hex code for the MSDN LB_SELECTSTRING
   my $ptr = pack( 'P', $selection );
   SendMessage( $lb, 0x018C , -1, unpack( 'L!', $ptr ) );
   }

   Tim


brentje <brentje@...> wrote:
   Yup...that's something that I discovered after I started using
GuiTest.  Not hard to do in yor script if you have the listbox's
handle, but it would be nice to build into the .XS file eventually as
Piotr mentioned.  In the meantime, here's what I came up with.  Keep
in mind that I prefer to do as much as possible with mouse clicks to
simulate a user as closely as possible.  There are other ways to write
this out, but you'll still have to use the SendMessage and pack/unpack
commands in any case.

You can read more on GuiTest's SendMessage command at:
http://www.piotrkaluski.com/files/winguitest/docs/ch09s74.html
For the pack/unpack commands, see:
http://www.perl.com/doc/manual/html/pod/perlfunc/pack.html
and
http://www.perl.com/doc/manual/html/pod/perlfunc/unpack.html
For Microsoft's standard control reference for Listboxes, visit:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor\
m/commctls/listboxes/listboxes.asp

sub SetListboxValue
{
     my $H_ListBox   = shift;
     my $s_FieldValue = shift;

     my $i_Index;

     my $S_SearchBuffer;
     my $p_Search;

#Create a C compliant variable that ends with a null character
#for the search, and send the LB_SELECTSTRING message to the
#field.  The value of LB_SELECTSTRING is 0x018C.  This will
#highlight the item you're looking for, and bring it into view
#if it's not currently visible.  Note that this does NOT cause
#any events to fire, so if there is an OnClick event for the
#listbox you'll have to manually click that item before anything #happens.
     $s_FieldValue = $s_FieldValue . "\0";
     $S_SearchBuffer = pack( 'P', $s_FieldValue );
     $p_Search = unpack( 'L!', $S_SearchBuffer );
     $i_Index = SendMessage( $H_ListBox, LB_SELECTSTRING(), -1,
$p_Search );

     if($i_Index < 0)
     {
         return 0;
     }

     undef $S_SearchBuffer;
     undef $p_Search;


#Re-use the SearchBuffer to hold the coordinates of the item.
     $S_SearchBuffer = pack( "LLLL",
         0,
         0,
         0,
         0,
     );

     $p_Search = unpack( 'L!', pack( 'P', $S_SearchBuffer ) );

#Get the items's coordinates.  The value of LB_GETITEMRECT is 0x0198.
     if(SendMessage( $H_ListBox, LB_GETITEMRECT , $i_Index, $p_Search )
> -1)
     {
         my ($i_LeftX, $i_TopY, $i_RightX, $i_BottomY) = unpack(
'LLLL', $S_SearchBuffer );

#Find the middle of the item, convert to absolute screen coordinates,
#and click on the item.
         my $i_ClientX = $i_LeftX + (int(($i_RightX - $i_LeftX)/2));
         my $i_ClientY = $i_TopY + (int(($i_BottomY - $i_TopY)/2));

         my ($i_X, $i_Y) = ClientToScreen( $H_ListBox, $i_ClientX,
$i_ClientY );

         MouseMoveAbsPix($i_X, $i_Y);
         SendMouse('{LEFTCLICK}');
     }

     return 1;
}


This should give you a good start for selecting listbox items.  Keep
in mind there's lot of information out there, and that it would
probably be good to write it into the .XS file if you have the time
and energy.

Brent



--- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@...> wrote:
>
> Hi everyone,
>
> I have just recently installed Win32-GuiTest on my computer at work. I
> plan to use Perl and Win32-GuiTest as the basis for running scripts to
> automate tseting of our software that we write and market. I seem to
> have quickly run into a fatal flaw in GuiTest. There is no function to
> select an item from a Listbox. Without this function I am afraid that
> I will have to just give up the whole idea. Maybe there are other
> missing functions as well.
>
> Does anyone know of a way to do do this?
>






   SPONSORED LINKS
         Basic programming language   C programming language   Computer
programming languages     The c programming language   C programming language  
List of programming languages

---------------------------------
   YAHOO! GROUPS LINKS


     Visit your group "perlguitest" on the web.

     To unsubscribe from this group, send an email to:
  perlguitest-unsubscribe@yahoogroups.com

     Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


---------------------------------






[Non-text portions of this message have been removed]

#1302 From: "Sachin Tiwari" <sach_tiw@...>
Date: Fri Mar 3, 2006 9:38 am
Subject: Cursor state delay to be calculated
sach_tiw
Send Email Send Email
 
Hi,

  I have an application that at times gets very slow. Say while
refreshing, the cursor gets into the hourglass state and comes back to
normal position after sometime. Now i would like to capture this time
delay.

Would like any pointers in how to get the task done.

Thanks,
Sachin

#1303 From: Alex Morozov <inductor2000@...>
Date: Fri Mar 3, 2006 10:09 am
Subject: Re: Cursor state delay to be calculated
inductor1975
Send Email Send Email
 
Maybe, this article will help you:

http://msdn.microsoft.com/msdnmag/issues/01/10/Cursor/default.aspx


> Hi,
>
>  I have an application that at times gets very slow. Say while
> refreshing, the cursor gets into the hourglass state and comes back to
> normal position after sometime. Now i would like to capture this time
> delay.
>
> Would like any pointers in how to get the task done.
>
> Thanks,
> Sachin
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> .
>
>

#1304 From: "hameed_shaahul" <hameed_shaahul@...>
Date: Wed Mar 8, 2006 7:48 pm
Subject: Errors during nmake test - Win32-GuiTest-1.50.3-ad
hameed_shaahul
Send Email Send Email
 
Hi

     I tried to install Win32-GuiTest-1.50.3-ad downloaded from
http://search.cpan.org/dist/Win32-GuiTest/
<http://search.cpan.org/dist/Win32-GuiTest/> .

These are the commands I tried to install

perl makefile.PL

nmake

nmake test

nmake install

But I get some errors during nmake test. I have attached the  logs
below.

perl makefile.PL

C:\9.x\Win32-GuiTest-1.50.3-ad>perl makefile.pl
Writing Makefile for Win32::GuiTestnmake

C:\9.x\Win32-GuiTest-1.50.3-ad>nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

          cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAV
E_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DPERL_MSVCRT_READFIX -
O1 -MD -Zi -DNDEBUG    -DVERSION=\"1.50.3-ad\"
-DXS_VERSION=\"1.50.3-ad\"  -IC:
\Perl\lib\CORE  guitest.cpp
guitest.cpp
          cl -c  -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAV
E_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DPERL_MSVCRT_READFIX -
O1 -MD -Zi -DNDEBUG    -DVERSION=\"1.50.3-ad\"
-DXS_VERSION=\"1.50.3-ad\"  -IC:
\Perl\lib\CORE  dibsect.cpp
dibsect.cpp
"Running Mkbootstrap for Win32::GuiTest ()"
          C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib
-MExtUtils::Command -e
chmod 644 GuiTest.bs
          link -out:blib\arch\auto\Win32\GuiTest\GuiTest.dll -dll -nologo
-nodefau
ltlib -debug -opt:ref,icf  -libpath:"C:\Perl\lib\CORE"  -machine:x86
GuiTest.obj
   DibSect.obj   C:\Perl\lib\CORE\perl56.lib oldnames.lib kernel32.lib
user32.lib
gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib
oleaut32
.lib  netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib
odbc32.li
b odbccp32.lib msvcrt.lib -def:GuiTest.def
     Creating library blib\arch\auto\Win32\GuiTest\GuiTest.lib and object
blib\arc
h\auto\Win32\GuiTest\GuiTest.exp
          C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib
-MExtUtils::Command -e
chmod 755 blib\arch\auto\Win32\GuiTest\GuiTest.dll
          C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib
-MExtUtils::Command -e
cp GuiTest.bs blib\arch\auto\Win32\GuiTest\GuiTest.bs
          C:\Perl\bin\perl.exe -IC:\Perl\lib -IC:\Perl\lib
-MExtUtils::Command -e
chmod 644 blib\arch\auto\Win32\GuiTest\GuiTest.bs

nmake test

C:\9.x\Win32-GuiTest-1.50.3-ad>nmake test

Microsoft (R) Program Maintenance Utility   Version 6.00.9782.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

          C:\Perl\bin\perl.exe -Mblib -IC:\Perl\lib -IC:\Perl\lib -e "use
Test::Ha
rness qw(&runtests $verbose); $verbose=0; runtests @ARGV;" t\02calc.t
t\basic.t
t\cpl.t t\std.t t\which.t
Using C:/9.x/Win32-GuiTest-1.50.3-ad/blib
t\02calc............Can't locate Test/More.pm in @INC (@INC contains:
C:/9.x/Win
32-GuiTest-1.50.3-ad/blib/arch C:/9.x/Win32-GuiTest-1.50.3-ad/blib/lib
C:\Perl\l
ib C:\Perl\lib C:/Perl/lib C:/Perl/site/lib . C:/Perl/lib
C:/Perl/site/lib .) at
   t\02calc.t line 8.
BEGIN failed--compilation aborted at t\02calc.t line 8.
t\02calc............dubious
          Test returned status 2 (wstat 512, 0x200)
t\basic.............Can't locate Test/More.pm in @INC (@INC contains:
C:/9.x/Win
32-GuiTest-1.50.3-ad/blib/arch C:/9.x/Win32-GuiTest-1.50.3-ad/blib/lib
C:\Perl\l
ib C:\Perl\lib C:/Perl/lib C:/Perl/site/lib . C:/Perl/lib
C:/Perl/site/lib .) at
   t\basic.t line 7.
BEGIN failed--compilation aborted at t\basic.t line 7.
t\basic.............dubious
          Test returned status 2 (wstat 512, 0x200)
t\cpl...............Can't locate Test/More.pm in @INC (@INC contains:
C:/9.x/Win
32-GuiTest-1.50.3-ad/blib/arch C:/9.x/Win32-GuiTest-1.50.3-ad/blib/lib
C:\Perl\l
ib C:\Perl\lib C:/Perl/lib C:/Perl/site/lib . C:/Perl/lib
C:/Perl/site/lib .) at
   t\cpl.t line 21.
BEGIN failed--compilation aborted at t\cpl.t line 21.
t\cpl...............dubious
          Test returned status 2 (wstat 512, 0x200)
t\std...............Can't locate Test/More.pm in @INC (@INC contains:
C:/9.x/Win
32-GuiTest-1.50.3-ad/blib/arch C:/9.x/Win32-GuiTest-1.50.3-ad/blib/lib
C:\Perl\l
ib C:\Perl\lib C:/Perl/lib C:/Perl/site/lib . C:/Perl/lib
C:/Perl/site/lib .) at
   t\std.t line 7.
BEGIN failed--compilation aborted at t\std.t line 7.
t\std...............dubious
          Test returned status 2 (wstat 512, 0x200)
t\which.............Can't locate Test/More.pm in @INC (@INC contains:
C:/9.x/Win
32-GuiTest-1.50.3-ad/blib/arch C:/9.x/Win32-GuiTest-1.50.3-ad/blib/lib
C:\Perl\l
ib C:\Perl\lib C:/Perl/lib C:/Perl/site/lib . C:/Perl/lib
C:/Perl/site/lib .) at
   t\which.t line 7.
BEGIN failed--compilation aborted at t\which.t line 7.
t\which.............dubious
          Test returned status 2 (wstat 512, 0x200)
FAILED--5 test scripts could be run, alas--no output ever seen
NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0x2'
Stop.

Could you help me solve the problem?

Regards

Shaahul Hameed



[Non-text portions of this message have been removed]

#1305 From: Alex Morozov <inductor2000@...>
Date: Thu Mar 9, 2006 8:18 am
Subject: Re: Errors during nmake test - Win32-GuiTest-1.50.3-ad
inductor1975
Send Email Send Email
 
It seems you have to install Test::More package. Which Perl distributive
are you using?
> Hi
>
>     I tried to install Win32-GuiTest-1.50.3-ad downloaded from
> http://search.cpan.org/dist/Win32-GuiTest/
> <http://search.cpan.org/dist/Win32-GuiTest/> .
>
>
[skip]

#1306 From: "Piotr Kaluski" <pkaluski@...>
Date: Thu Mar 9, 2006 9:01 am
Subject: Re: Errors during nmake test - Win32-GuiTest-1.50.3-ad
pkaluski
Send Email Send Email
 
Also please take the most recent version from winguitest project on
soruceforge.
--Piotr

--- In perlguitest@yahoogroups.com, Alex Morozov <inductor2000@...>
wrote:
>
> It seems you have to install Test::More package. Which Perl
distributive
> are you using?
> > Hi
> >
> >     I tried to install Win32-GuiTest-1.50.3-ad downloaded from
> > http://search.cpan.org/dist/Win32-GuiTest/
> > <http://search.cpan.org/dist/Win32-GuiTest/> .
> >
> >
> [skip]
>

#1307 From: Steve Loughran <stevelml1@...>
Date: Mon Mar 13, 2006 9:49 pm
Subject: SendRawKey problems...
stevelml1@...
Send Email Send Email
 
Hi all

Been banging my head against this for the last 2-3 hours, and its
driving me nuts.

ActivePerl 5.8.6.<something>
Win32 Gui Test v1.50.5 (install from ppd file)

I cannot get SendRawKey to send *anything* to the active window (testing
with Notepad right now). I want to be able to send Left Alt Down, Left
Alt Up, but its not sending anything at all... nothing...

I searched the archives and found:

===========

For the ALT key, you could use
Press: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY);
Release: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP);

===========

and looked through the guitest.pm for the correct usage and any other
tips I could find.

I managed to get SetFocus() + SendKeys() working first time, but
SendRawKey() is infuriating me :)

Many thanks for your help!!

Steve

#1308 From: Alex Morozov <inductor2000@...>
Date: Tue Mar 14, 2006 6:15 am
Subject: Re: SendRawKey problems...
inductor1975
Send Email Send Email
 
Can you provide your sample code?

> Hi all
>
> Been banging my head against this for the last 2-3 hours, and its
> driving me nuts.
>
> ActivePerl 5.8.6.<something>
> Win32 Gui Test v1.50.5 (install from ppd file)
>
> I cannot get SendRawKey to send *anything* to the active window (testing
> with Notepad right now). I want to be able to send Left Alt Down, Left
> Alt Up, but its not sending anything at all... nothing...
>
> I searched the archives and found:
>
> ===========
>
> For the ALT key, you could use
> Press: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY);
> Release: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP);
>
> ===========
>
> and looked through the guitest.pm for the correct usage and any other
> tips I could find.
>
> I managed to get SetFocus() + SendKeys() working first time, but
> SendRawKey() is infuriating me :)
>
> Many thanks for your help!!
>
> Steve
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
> .
>
>

#1309 From: naveen antony <neevanantony@...>
Date: Tue Mar 14, 2006 9:10 am
Subject: Firefox automation
neevanantony
Send Email Send Email
 
Hi all,
I want to automate Mozilla Firefox.

Could somebody suggest any package that can be used for this.

Tried to install mozilla-mechanize but it asks for some other package to be
installed before installing it.

Thanx for your help.
Neevan


---------------------------------
  Yahoo! Mail
  Use Photomail to share photos without annoying attachments.

[Non-text portions of this message have been removed]

#1310 From: "Gabor Szabo" <szabgab@...>
Date: Tue Mar 14, 2006 11:47 am
Subject: Re: Firefox automation
gabor529
Send Email Send Email
 
I let this message in but I actualy think you should look a bit more
closely where to look for help.

This mailing list is about Win32::GUITest and not Mozilla or Firefox.
For that you might go to the mozilla-mechanize mailing list (if there is one)
or the mozilla-mechanize web forum on www.cpanforum.com .

In any case I think I would juts install the dependencies needed.
Gabor


On 3/14/06, naveen antony <neevanantony@...> wrote:
> Hi all,
> I want to automate Mozilla Firefox.
>
> Could somebody suggest any package that can be used for this.
>
> Tried to install mozilla-mechanize but it asks for some other package to be
installed before installing it.
>
> Thanx for your help.
> Neevan
>
>
> ---------------------------------
>  Yahoo! Mail
>  Use Photomail to share photos without annoying attachments.
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


--
Gabor Szabo
Open Source Training in Israel  http://www.pti.co.il
08-975-2897   054-4624648    AIM: gabor529

#1311 From: Steve Loughran <stevelml1@...>
Date: Tue Mar 14, 2006 3:47 pm
Subject: Re: SendRawKey problems...
stevelml1@...
Send Email Send Email
 
oops... I had a brain meltdown, its all working and doing what it should
be doing now.

Sorry to take up your time...

Steve
(I never make the same mistakes twice, I always find new ones to make)

Alex Morozov wrote:
> Can you provide your sample code?
>

#1312 From: "finite_sf" <silver7@...>
Date: Thu Mar 16, 2006 4:42 am
Subject: Can someone post a GetTabItems & SelectTabItem example?
finite_sf
Send Email Send Email
 
If anyone has a moment could you please post a example of using the following
functions:

GetTabItems
SelectTabItem

Using some generic default windows app. Such as Local Disk (c:) Properties, or
System
Properties.

Thanks
-M

#1313 From: "Dennis K. Paulsen" <ctrondlpaulsden@...>
Date: Mon Mar 27, 2006 3:02 am
Subject: Re: Can someone post a GetTabItems & SelectTabItem example?
ctrondlpaulsden
Send Email Send Email
 
Hi,

Yes, example below.  Script assumes System Properties is already
running:

#!/usr/bin/perl

use Win32::GuiTest qw(:ALL);

my ($w) = FindWindowLike(0, "System Properties");
if (!$w) {
	 die "Please start System Properties first!";
}

my ($tabControl) = FindWindowLike($w, undef, "SysTabControl32");
if (!$tabControl) {
	 die "Uh, window has no tab control!";
}

print "Items in Tab Control:\n";
foreach my $i (GetTabItems($tabControl)) {
	 print "$i\n";

}


print "Selecting third item.\n";
SelTabItem($tabControl, 2); # 0 based, so 2 is third item
print "done\n";



Regards,
Dennis K. Paulsen


--- In perlguitest@yahoogroups.com, "finite_sf" <silver7@...> wrote:
>
> If anyone has a moment could you please post a example of using
the following functions:
>
> GetTabItems
> SelectTabItem
>
> Using some generic default windows app. Such as Local Disk (c:)
Properties, or System
> Properties.
>
> Thanks
> -M
>

#1314 From: "Dennis K. Paulsen" <ctrondlpaulsden@...>
Date: Mon Mar 27, 2006 3:08 am
Subject: Re: SendRawKey problems...
ctrondlpaulsden
Send Email Send Email
 
In your Win32::GuiTest import line (use Win32::GuiTest qw(...)),
make sure your including SendRawKey and the appropriate tag (:ALL,
etc.) to import the VK_LMENU, etc. constants...  Also make sure your
using "use strict;" and "use warnings;"; which can help any
developer a lot....   Also check out Win32GUITest.exe from the
project website..  It creates a script from your interactions. Even
though its in early stages and doesn't handle many control
functions, it may help if your getting use to SendRawKey....

Hope that helped.

Regards,
Dennis K. Paulsen


--- In perlguitest@yahoogroups.com, Alex Morozov <inductor2000@...>
wrote:
>
> Can you provide your sample code?
>
> > Hi all
> >
> > Been banging my head against this for the last 2-3 hours, and
its
> > driving me nuts.
> >
> > ActivePerl 5.8.6.<something>
> > Win32 Gui Test v1.50.5 (install from ppd file)
> >
> > I cannot get SendRawKey to send *anything* to the active window
(testing
> > with Notepad right now). I want to be able to send Left Alt
Down, Left
> > Alt Up, but its not sending anything at all... nothing...
> >
> > I searched the archives and found:
> >
> > ===========
> >
> > For the ALT key, you could use
> > Press: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY);
> > Release: SendRawKey(VK_LMENU, KEYEVENTF_EXTENDEDKEY |
KEYEVENTF_KEYUP);
> >
> > ===========
> >
> > and looked through the guitest.pm for the correct usage and any
other
> > tips I could find.
> >
> > I managed to get SetFocus() + SendKeys() working first time, but
> > SendRawKey() is infuriating me :)
> >
> > Many thanks for your help!!
> >
> > Steve
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> > .
> >
> >
>

#1315 From: "Tim Mitchell" <maxquig@...>
Date: Fri Mar 31, 2006 3:11 pm
Subject: Re: move the mouse to the node of a TreeView
tmaxquig
Send Email Send Email
 
He guys,

TVM_GETITEMRECT requires the handle of the item in the tree that you
want to find the coordinates of. Winspy doesn't show any child
windows belonging to the SysTreeView32. FindWindowLike also doesn't
find any child windows. How can I make SendMessage work with
TVM_GETITEMRECT to get the coordinates of the selected item on a
tree so that I can tell the mouse click where to go?

Tim
--- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@...>
wrote:
>
> Hi,
> I believe that the message TVM_GETITEMRECT could be something you
are
> looking for. If you are more experienced in perl you can try my
> advanced tutorial
> (http://www.piotrkaluski.com/files/winguitest/docs/ch02s04.html)
on
> how to send such a message.
>
> -Piotr
>
>
> --- In perlguitest@yahoogroups.com, "ae_hutter"
> <Anneliese.Hutter@c...> wrote:
> > Hello,
> >
> > could anybody please help me with a tricky automation challenge?
> >
> > I need to doubleclick on a node of a TreeView, and do not know
how
> to
> > move the mouse to this node.
> >
> > I could select the desired node from the tree with
Win32::GuiTest
> > (which, BTW, is a very great tool) and now I need to doubleclick
on
> > it. Unfortunately the tested application can only accept a
> > doubleclick and not the Enter-key. Therefore I can not use the
> > SendKeys function here.
> >
> > For using SendMouse or MouseClick I need to move the mouse to
this
> > node. Otherwise it executes the mouse-click on the place where
the
> > mouse-pointer was before starting the test.
> > Is there a way to get the coordinates of the TreeView node at
test-
> > runtime?
> >
> > Thanks for any hint,
> > Anneliese
>

#1316 From: "brentje" <brentje@...>
Date: Fri Mar 31, 2006 7:15 pm
Subject: Re: move the mouse to the node of a TreeView
brentje
Send Email Send Email
 
I've been looking into similar things regarding TreeView.  Haven't
written code for it yet, but the info it out there.  The MSDN, while a
little confusing at times, is your friend.  Take a look at
TVM_GETITEM, using the TVIF_STATE flag for TVITEM.  You can use that
to get the selected item.  Feed the handle it returns into
TVM_GETITEMRECT, and you should be good to go.

Here's the links you'll need:

TVM_GETITEM Message
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor\
m/commctls/treeview/messages/tvm_getitem.asp

TVITEM Struct
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor\
m/commctls/treeview/structures/tvitem.asp

Tree-View Control Item States
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platfor\
m/commctls/treeview/item_states.asp

--- In perlguitest@yahoogroups.com, "Tim Mitchell" <maxquig@...> wrote:
>
> He guys,
>
> TVM_GETITEMRECT requires the handle of the item in the tree that you
> want to find the coordinates of. Winspy doesn't show any child
> windows belonging to the SysTreeView32. FindWindowLike also doesn't
> find any child windows. How can I make SendMessage work with
> TVM_GETITEMRECT to get the coordinates of the selected item on a
> tree so that I can tell the mouse click where to go?
>
> Tim
> --- In perlguitest@yahoogroups.com, "Piotr Kaluski" <pkaluski@>
> wrote:
> >
> > Hi,
> > I believe that the message TVM_GETITEMRECT could be something you
> are
> > looking for. If you are more experienced in perl you can try my
> > advanced tutorial
> > (http://www.piotrkaluski.com/files/winguitest/docs/ch02s04.html)
> on
> > how to send such a message.
> >
> > -Piotr
> >
> >
> > --- In perlguitest@yahoogroups.com, "ae_hutter"
> > <Anneliese.Hutter@c...> wrote:
> > > Hello,
> > >
> > > could anybody please help me with a tricky automation challenge?
> > >
> > > I need to doubleclick on a node of a TreeView, and do not know
> how
> > to
> > > move the mouse to this node.
> > >
> > > I could select the desired node from the tree with
> Win32::GuiTest
> > > (which, BTW, is a very great tool) and now I need to doubleclick
> on
> > > it. Unfortunately the tested application can only accept a
> > > doubleclick and not the Enter-key. Therefore I can not use the
> > > SendKeys function here.
> > >
> > > For using SendMouse or MouseClick I need to move the mouse to
> this
> > > node. Otherwise it executes the mouse-click on the place where
> the
> > > mouse-pointer was before starting the test.
> > > Is there a way to get the coordinates of the TreeView node at
> test-
> > > runtime?
> > >
> > > Thanks for any hint,
> > > Anneliese
> >
>

#1317 From: "alexnzus" <alexnzus@...>
Date: Mon Apr 3, 2006 5:15 am
Subject: LOOKING FOR EXAMPLES
alexnzus
Send Email Send Email
 
Hi all,

I have just started using Win32::GuiTest, and would appreciate it if
you could refer me to some examples. I am aware of those on
http://search.cpan.org/~ctrondlp/Win32-GuiTest-1.50.3-ad/Examples.pm
and
http://www.piotrkaluski.com/files/winguitest/docs/winguitest.html,
but they don't quite cover what I need.

The application I work with starts with a splash and logon window.
In the logon window there are a few textboxes, that may contain some
default values. Some have a dropdown list attached. The user can
either choose one of the existing values, or enter a new one. Perl
code should check if the values in the textboxes match specified
parameters, and either replace those values with the respective
parameter, or simply enter it if the box is empty.

What functions could I use to do that? For instance, how to clean
the contents of the text box and enter a new value?

Thanks in advance.

Messages 1288 - 1317 of 1818   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help