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

Re: FindWindowLike doesn't recognise my popup window?

Expand Messages
  • maryshi_us
    I think FindWindowLike don t know popup window. ... me with different window title. ... for. You can specify regular expression also. ... popup window?
    Message 1 of 8 , Oct 11, 2006
      I think FindWindowLike don't know popup window.
      --- In perlguitest@yahoogroups.com, "Santosh Kumar"
      <kadlisantosh@...> wrote:
      >
      > I don't find any issues with your code, same peace of code works for
      me with different window title.
      > my @win=FindWindowLike(0, "Open Perl IDE*");
      > die "No agent tool is running, please open one.\n" if not @win;
      > if(@win){
      > print "Tool is running\n" ;
      > }
      >
      > Just try giving exact string as that of window title that you are looking
      for. You can specify regular expression also.
      >
      > Cheers,
      > ~Santosh kumar
      >
      > ----- Original Message -----
      > From: maryshi_us
      > To: perlguitest@yahoogroups.com
      > Sent: Wednesday, October 11, 2006 4:34 AM
      > Subject: [perlguitest] Re: FindWindowLike doesn't recognise my
      popup window?
      >
      >
      > I tried with and without space. Neither of them works.
      > --- In perlguitest@yahoogroups.com, "Chris Hilton" <chilton@>
      wrote:
      > >
      > > Is FindWindowLike(0, "Update ") supposed to have a space after
      > Update?
      > >
      > > Chris
      > >
      > >
      > > ________________________________
      > >
      > > From: perlguitest@yahoogroups.com
      > > [mailto:perlguitest@yahoogroups.com] On Behalf Of maryshi_us
      > > Sent: Tuesday, 10 October, 2006 16:54
      > > To: perlguitest@yahoogroups.com
      > > Subject: [perlguitest] FindWindowLike doesn't recognise my
      > popup
      > > window?
      > >
      > >
      > >
      > > My code is
      > >
      > > my @win=FindWindowLike(0, "Agent Tool ");
      > > die "No agent tool is running, please open one.\n" if not
      > @win;
      > > if(@win){
      > > print "Tool is running\n" ;
      > > }
      > >
      > > my $menu = GetMenu($win[0]);
      > > my $submenu = GetSubMenu($menu, 0);
      > > MenuSelect("&Tools|Check For &Updates", $win[0], $menu);
      > > sleep(1);
      > >
      > > my @win_popup=FindWindowLike(0, "Update ");
      > > die "Cannot get popup window.\n" if not@win_popup;
      > > print "Popup window is running.\n" if @win_popup;
      > > PushButton("&Cancel");
      > >
      > > it is failed because FindWindowLike cannot fine "Update",
      > which
      > > is a
      > > popup window. if ignore die "Cannot get popup window.\n" if
      > @
      > >
      > >
      > >
      > >
      > >
      > >
      > >
      > > [Non-text portions of this message have been removed]
      > >
      >
      >
      >
      >
      >
      > [Non-text portions of this message have been removed]
      >
    • Tim Mitchell
      This happens to me often in my test scripts. It usually is because my script gets ahead of the application. It s a matter of timing. Try inserting a sleep
      Message 2 of 8 , Oct 11, 2006
        This happens to me often in my test scripts. It usually is because my
        script gets ahead of the application. It's a matter of timing. Try
        inserting a sleep command before the FindWindowLike line.

        Tim
        --- In perlguitest@yahoogroups.com, "maryshi_us" <maryshi_us@...> wrote:
        >
        > My code is
        >
        > my @win=FindWindowLike(0, "Agent Tool ");
        > die "No agent tool is running, please open one.\n" if not @win;
        > if(@win){
        > print "Tool is running\n" ;
        > }
        >
        > my $menu = GetMenu($win[0]);
        > my $submenu = GetSubMenu($menu, 0);
        > MenuSelect("&Tools|Check For &Updates", $win[0], $menu);
        > sleep(1);
        >
        > my @win_popup=FindWindowLike(0, "Update ");
        > die "Cannot get popup window.\n" if not@win_popup;
        > print "Popup window is running.\n" if @win_popup;
        > PushButton("&Cancel");
        >
        > it is failed because FindWindowLike cannot fine "Update", which is a
        > popup window. if ignore die "Cannot get popup window.\n" if @
        >
      • maryshi_us
        Thanks! ... child of ... etc.. ? They ... example, ... since its ... [mailto:perlguitest@yahoogroups.com] On ... window?
        Message 3 of 8 , Oct 11, 2006
          Thanks!
          --- In perlguitest@yahoogroups.com, "stuart arnold" <stuart.arnold@...>
          wrote:
          >
          > 1. if you do have the window of "Agent Tool", is the popup window a
          child of
          > it? if so, pass the $win[0] to that call to isolate it.
          > 2. is the popup window a Windows "window" and not a javascript,
          etc.. ? They
          > tend not to work very well.
          > (pls not "o" does not look too well as opposed to a "0" in your
          example,
          > just a complaint...)
          > 3. using (not @winpop), is probably better to use ($#winpopup < 0)
          since its
          > an array tellingh you # of elements.
          > 4. Have you tried "^Update" since this function uses regex?
          >
          > Hope some of this may help
          >
          > -----Original Message-----
          > From: perlguitest@yahoogroups.com
          [mailto:perlguitest@yahoogroups.com] On
          > Behalf Of maryshi_us
          > Sent: Tuesday, October 10, 2006 5:54 PM
          > To: perlguitest@yahoogroups.com
          > Subject: [perlguitest] FindWindowLike doesn't recognise my popup
          window?
          >
          >
          >
          > My code is
          >
          > my @win=FindWindowLike(0, "Agent Tool ");
          > die "No agent tool is running, please open one.\n" if not @win;
          > if(@win){
          > print "Tool is running\n" ;
          > }
          >
          > my $menu = GetMenu($win[0]);
          > my $submenu = GetSubMenu($menu, 0);
          > MenuSelect("&Tools|Check For &Updates", $win[0], $menu);
          > sleep(1);
          >
          > my @win_popup=FindWindowLike(0, "Update ");
          > die "Cannot get popup window.\n" if not@win_popup;
          > print "Popup window is running.\n" if @win_popup;
          > PushButton("&Cancel");
          >
          > it is failed because FindWindowLike cannot fine "Update", which is a
          > popup window. if ignore die "Cannot get popup window.\n" if @
          >
          >
          >
          >
          >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.