Forum Discussion

yogeshharsh's avatar
yogeshharsh
Occasional Contributor
12 years ago

Clicking a button but no response

Hi ,



I am using the Test Comlete 10 on a windows app under test. I am trying to click a button using the ClickButton action. The click is performed but  the resulting event that is a confirmation check box is not displayed.

(When i perform a manual click, all working fine though).



I am using the VBScript. I have pasted below the code which is generated when we try to record the clicking action on this button and that is kind of same what i am using in my project 



ApplicationName.Window("#32770", "Informations").Window("Button", "OK").ClickButton



Can you please tell me if there is something i ned to use in order to make Test complete perform the click properly.



Thanks





5 Replies

  • NisHera's avatar
    NisHera
    Valued Contributor
    To me it seems no probelm with code. 

    Anyway make sure parameters are correct. For example in windows calculator I got .....Window("CalcFrame","Calculator",1) 

    Make sure you have application compiled with debug information.

    Use Object spy to inspect the object and make sure ClickButton method is available



    And how do you know click is performed and OK button was exists at that exact time?

    Wasn't there an error message?
  • yogeshharsh's avatar
    yogeshharsh
    Occasional Contributor


    Hello Herath,



    I see the button being clicked but there is no event fired as expected after the button is clicked. I just click the buton manualy so that expected message pops out and script can continue.



    No there was no error message at all,



    The action Click on button is actually available.





  • yogeshharsh's avatar
    yogeshharsh
    Occasional Contributor
    Hi Marsha,



    I have tried Waitproperty but no positives :(



    Actually test complete is abl to find and click the button but the second part is not done properly i.e. clicking that button.



    Thanks
  • Can you try the below actions -



    1. Try to use Click() Method rather than ClickButton.

    2.  Try  Click()/ClickButton Method by passing a Co–Ordinates Ex Click(0,0)

    (In some cases by default, ClickButton will perform the click action some perticular co -ordinates of the object,  which results click action will not perform any action for that co-ordinates  ).

    3.  Restore the window and try the Click action.

    4.  Try to set the SetFocus on the object before clicking the object.