Forum Discussion
- 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() ?
- tristaanogreEsteemed 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_2Occasional 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.
- AlexKaras
Champion Level 3
Hi Chris,
As a (temporary possible) workaround you may also consider CallObjectMethodAsync method (https://support.smartbear.com/testcomplete/docs/reference/project-objects/items/script/runner/callobjectmethodasync.html)