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

PushChildButton problems

Expand Messages
  • chobitex
    Hello, I have been using the GuiTest package for automation data gathering. I have noticed that the PushChildButton() function is inconsitant, and occationally
    Message 1 of 4 , Aug 8, 2003
    • 0 Attachment
      Hello,

      I have been using the GuiTest package for automation data gathering.
      I have noticed that the PushChildButton() function is inconsitant,
      and occationally will only highlight the button (have the cursor end
      up on it) but not have the action caused by pushing the button
      actually occur.

      I have also noticed that this function *will* allow a button to be
      pushed that is inactive (with the text faded out), which *does* cause
      the action associated to the button to happen (even while the button
      is disabled) causing... interesting results to say the least.

      Has anyone else noticed this, or had problems with inconstancy in the
      PushChildButton function? I have had to replace this function with
      mouse clicks.

      Thank you,
      ~Mike~ (ChobitEX@...)
    • Dennis K. Paulsen
      Haven t seen this inconsistency myself. If your able to reproduce it, providing some detailed information (OS, sample script, etc.) may be helpful. And the
      Message 2 of 4 , Aug 10, 2003
      • 0 Attachment
        Haven't seen this inconsistency myself. If your able to reproduce
        it, providing some detailed information (OS, sample script, etc.)
        may be helpful.

        And the following code prevents PushChildButton from working on a
        disabled button:

        sub PushChildButton {
        my $parent = shift;
        my $button = shift;
        my $delay = shift;
        $delay = 0 unless defined($delay);
        for my $child (GetChildWindows($parent)) {
        # Is correct text or correct window ID? Also make sure
        button is enabled.
        if (MatchTitleOrId($child, $button) && IsWindowEnabled
        ($child)) {
        # Need to use PostMessage. SendMessage won't return
        when certain dialogs come up.
        PostMessage($child, WM_LBUTTONDOWN(), 0, 0);
        # Allow for user to see that button is being pressed by
        waiting some ms.
        select(undef, undef, undef, $delay) if $delay;
        PostMessage($child, WM_LBUTTONUP(), 0, 0);
        return(1);
        }
        }
        return(0);
        }

        Regards,
        Dennis K. Paulsen

        --- In perlguitest@yahoogroups.com, "chobitex" <chobitex@y...> wrote:
        > Hello,
        >
        > I have been using the GuiTest package for automation data
        gathering.
        > I have noticed that the PushChildButton() function is inconsitant,
        > and occationally will only highlight the button (have the cursor
        end
        > up on it) but not have the action caused by pushing the button
        > actually occur.
        >
        > I have also noticed that this function *will* allow a button to be
        > pushed that is inactive (with the text faded out), which *does*
        cause
        > the action associated to the button to happen (even while the
        button
        > is disabled) causing... interesting results to say the least.
        >
        > Has anyone else noticed this, or had problems with inconstancy in
        the
        > PushChildButton function? I have had to replace this function
        with
        > mouse clicks.
        >
        > Thank you,
        > ~Mike~ (ChobitEX@h...)
      • pkaluski
        Hi, I had the same problem. And I believe I have found the reason why it happens. I placed a detailed explanation on my website. Have a look:
        Message 3 of 4 , Sep 24, 2004
        • 0 Attachment
          Hi,
          I had the same problem. And I believe I have found the reason why it
          happens. I placed a detailed explanation on my website. Have a look:
          http://www.piotrkaluski.com/automation/gui/carfl_pushcb.html

          --- In perlguitest@yahoogroups.com, "chobitex" <chobitex@y...> wrote:
          > Hello,
          >
          > I have been using the GuiTest package for automation data
          gathering.
          > I have noticed that the PushChildButton() function is inconsitant,
          > and occationally will only highlight the button (have the cursor
          end
          > up on it) but not have the action caused by pushing the button
          > actually occur.
          >
          > I have also noticed that this function *will* allow a button to be
          > pushed that is inactive (with the text faded out), which *does*
          cause
          > the action associated to the button to happen (even while the
          button
          > is disabled) causing... interesting results to say the least.
          >
          > Has anyone else noticed this, or had problems with inconstancy in
          the
          > PushChildButton function? I have had to replace this function with
          > mouse clicks.
          >
          > Thank you,
          > ~Mike~ (ChobitEX@h...)
        • Coleman Tom
          nice article. interesting how the id and window text can get mixed up Some languages allow you to specify if the value being provided is a handle, id, or
          Message 4 of 4 , Sep 30, 2004
          • 0 Attachment
            nice article.

            interesting how the id and window text can get mixed up

            Some languages allow you to specify if the value being provided is a handle,
            id, or caption with a special character that precedes the value.

            PushChildButton( $parrent, "=5436" ); # control handle
            PushChildButton( $parrent, "#5436" ); # control ID
            PushChildButton( $parrent, "@5436" ); # control ordinal ( tab order )
            PushChildButton( $parrent, "5436" ); # control caption

            I would suggest not using this secret code, but rather add another optional
            argument, so one can specify what to look for.

            -----Original Message-----
            From: pkaluski [mailto:pkaluski@...]
            Sent: Friday, September 24, 2004 11:53 PM
            To: perlguitest@yahoogroups.com
            Subject: [perlguitest] Re: PushChildButton problems


            Hi,
            I had the same problem. And I believe I have found the reason why it
            happens. I placed a detailed explanation on my website. Have a look:
            http://www.piotrkaluski.com/automation/gui/carfl_pushcb.html
            <http://www.piotrkaluski.com/automation/gui/carfl_pushcb.html>

            --- In perlguitest@yahoogroups.com, "chobitex" <chobitex@y...> wrote:
            > Hello,
            >
            > I have been using the GuiTest package for automation data
            gathering.
            > I have noticed that the PushChildButton() function is inconsitant,




            -------------------------------------------------------------------------------
            This message and any included attachments are from Siemens Medical Solutions
            USA, Inc. and are intended only for the addressee(s).
            The information contained herein may include trade secrets or privileged or
            otherwise confidential information. Unauthorized review, forwarding, printing,
            copying, distributing, or using such information is strictly prohibited and may
            be unlawful. If you received this message in error, or have reason to believe
            you are not authorized to receive it, please promptly delete this message and
            notify the sender by e-mail with a copy to Central.SecurityOffice@...

            Thank you

            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.