SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Feb 2008
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to click on buttons on a window?

    I wrote scripts for automating our tool.
    i need to click on the button on the window.
    The problem i am facing is sometimes it needs two clicks and sometime one click.

    Can anybody help me regarding this?
    I am using TestComplete6

    Thanks

  2. #2
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to click on buttons on a window?

    Hi,

    Please describe the problem in detail. Does the ClickButton method sometimes fail to work with the button or is it part of the application's logic that sometimes the button should be clicked twice?
    In the latter case, you can check some condition (for example, check whether a window appeared after the first click) and click the button once more if this condition is met.
    Jared - AQA Support

  3. #3
    Junior Member
    Join Date
    Feb 2008
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to click on buttons on a window?

    Sorry for the confusion.
    The application's logic requires only one click all the time.However while automating through TestComplete, one click doesn't always work.Sometimes it requires two clicks.

    Thanks

  4. #4
    Senior Member
    Join Date
    Aug 2006
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to click on buttons on a window?

    Hi,

    Please post here the script you are running along with execution results or send it to us at support@automatedqa.com.
    Also, what button control are you using? Is it a standard Win32 control or a third-party button?
    Jared - AQA Support

  5. #5
    Senior Member
    Join Date
    Feb 2008
    Posts
    124
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to click on buttons on a window?

    Hi dhn,

    One of the things I learned a couple of weeks ago is that sometimes there is a delay between the time a particular GUI control becomes visible and the time the control is actually "enabled". Whenever I've run into situations like that, I use one of the "Wait" commands and combine that with a check to see if the control is "Enabled" prior to attempting to click on it.

    Regards,
    Nat

  6. #6
    Junior Member
    Join Date
    Jan 2007
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to click on buttons on a window?

    Off the top of my head, you could try this:


    If your button forced a modal window to appear, you could write something like this.
    begin
    while (not YourProcess.waitwindow('Pop up window',1000).Exists do
    begin
    YourButton.ClickButton();
    end;
    end;


    If it did something other than pop up a modal window, just throw the results of the button click inside the While condition and then it will click the button until it happens. So, if it happens on the first time, it would only do the loop once. If it needed to do it twice, then it would do it twice. Three times, four times, etc. It would all work.

  7. #7
    Junior Member
    Join Date
    Feb 2008
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to click on buttons on a window?

    Hi,
    I used NRusso's reply and it seems to be workinig now

    Thanks to all

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:26 AM.

Copyright BetaSoft Inc.