Forum Discussion

croberts_2's avatar
croberts_2
Occasional Contributor
7 years ago

ClickButton event hangs and doesn't complete until I stop playback.

Hi All,

Strange one this.  I have a key word command that is clicking the save button on a web page.  When I "Run Selected Operation" on the command the test pauses indefinitely....until I stop playback...at which point the command completes.

 

This is preventing my keyword test from completing.  Has anybody experienced anything like this?

 

 

Cheers,
Chris.

 

 

5 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Chris,

     

    > Has anybody experienced anything like this?

    Not sure... Unless you let us know more details.
    The most useful thing will be how you are getting the reference to the problematic button.

    Screenshot of the test might help as well.

    As a quick idea, does it help if you replace .ClickButton() call with the call to .Click() ?

     

     

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What happens if you replace ClickButton with just a simple Click operation with parameters of -1, -1?  It's possible that there's something "special" about the implementation of the button in your application that is doing some sort of strange script processing behind the scenes that TestComplete cannot detect properly.  ClickButton executes SLIGHTLY differently than "Click" so I'd try just a straight "Click" first to see if that takes care of things.

    • croberts_2's avatar
      croberts_2
      Occasional Contributor

      Thanks for the reply but no dice I'm afraid, the click event does the same as the ClickButton event.

       

      I have made some progress though.  Looks like there's a problem with an earlier step in the keyword test. The step(s) in question download a file from the same web page in order to check some data.  When I click the download button a new blank browser tab is opened which I need to close so I am returned to the original tab and can complete the download process. This is a defect as the download button should not trigger the creation of a blank tab.  If I comment out the file download steps (so no blank tab is created) the ClickButton event fires and completes without issue so I think the problem actually relates to the defect in the file download process.  i.e. the process of opening or closing the blank tab is effecting the object state of the browser...

       

      I will wait for the defect to be fixed and then reinstate the download steps at which point the test will hopefully run end-to-end.

       

      Thanks for getting back to me though!     

      Chris.