in reply to Re^6: Gui Automation using guitest
in thread Gui Automation using guitest

This isn't very helpful. What did you change when you edited the code? Have you tried going back to basic debugging to find out what's going wrong? See Debugging and Optimization from tutorials.

Replies are listed 'Best First'.
Re^8: Gui Automation using guitest
by shayak (Acolyte) on Feb 15, 2011 at 10:26 UTC
    I am editing and uploading the updated code.. The code which u r seeing now is the updated one after editing..

      The post I'm replying to doesn't have any code, if you have replaced the code in your first post in this tread you've just invalidated several responses to your original code. I'm sure you can see how confusing this thread will now look. My advice would be to change it back and post your updated code rather than replace what you had.

        #! usr/bin/perl #use Win32::Gui; use Win32::GuiTest qw(:ALL); use strict; my $window = FindWindowLike( undef,"[Install*.*|*Setup.*]","" ); for($window) { SetForegroundWindow($window); my @hwnds = GetChildWindows($window); foreach(@hwnds) { SetForegroundWindow($_); my $var = GetWindowText($_); print "shayak"; print $var; my $class = GetClassName($_); print $class; #my $child = GetChildDepth(GetDesktopWindow(), $_); #print $child; if ($class eq ["*RadioButton"]) { my $id=GetWindowID($_); print $id; #CheckButton(GetWindowID($name); if (WMGetText($id)eq(["*agree*" ]or ["*accept*"])) { CheckButton($id); } else { SendKeys{"TAB"}; SendKeys{"UP"}; } } #PushButton("Next" or "Agree" or "Install" or "Yes" or "Fi +nish" or "Done"); SendKeys("~"); } }

      All that changing around won't help you. You need to learn programming, or at least some basic debugging skills. Following the points made in (for example) brian's Guide to Solving Any Perl Problem will also help.

        Thanx for the link. Actually im not at all a programmer. i have just a basic c knowledge. In my work i needed to do some testing manualy. Im just trying to automate it for my own good. In that process im learning perl also and then coding it..