Forum Discussion

Haiyangwhu's avatar
Haiyangwhu
Contributor
11 years ago

Control get lost in TestComplete 10.50?

Hi,



My tests have a step to find a Menubar control and performs click on it. The control can be found at first, but after a point in middle of test running, the control is no longer found. Please refer to attachment for more info.



I had the issue after the upgrade from TestComplete9.1 to TestComplate10.50.



TestComplate10.50

OS: win7



Is it a known issue? What should i do to fix it?



Thanks,

Ocean
  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    Not sure if this is the same issue or not, but I was having a similar issue when my projects "Auto-wait timeout, ms:" under playback options was set too high. Seemed like the .Find method was causing the object mapping or script extensions to fail and objects were no longer being recognized. I was able to overcome the issue by adjusting this setting programmatically (to 3500 MS and then back up to properly wait for some controls).
  • Hi Ryan, thanks for your reply. The Auto-wait timeout value i set is 3000ms. It's a small value.



    I get the issue again today, when not running tests, manually open the dialog, i can get NativeClrObject property for it, but during test running, i can't get NativeClrObject property. 



    -Ocean



  • Ryan_Moran's avatar
    Ryan_Moran
    Valued Contributor
    Are you restarting the application during the test run?

    It's possible you are starting your application as Administrator but not Test Complete.

    So it could be a simple fix by running Test Complete as administrator.

    Not confident this will be the case since you said it works until the middle of your test.



    Since you say it works for most of the test and then stops working at some point in the middle of the test I think it's logical to assume you are running into a similar bug to the one I encountered where the extension used to expose extended properties of WinFormsObject suddenly stops working.

    (You'll notice the Name property of your object does not include WinFormsObject)

    WinFormsObject("PublishWorkbookDialog") vs. Dialog("Publish to Toad Intelligence Central")



    As a test you can try increasing your autowaittimeout setting to a much higher value like say...300000 and see if you run into the same issue. If resolves the problem then you can use Options.Run.Timeout to adjust this programmatically. I have to set this to 3500ms or lower when I call the .Find method (otherwise the same issue occurs where I lose extended properties) and increase to a very high amount for everything else that I do. This of course can lead to longer test runs and is not the "optimal solution" but I have been unable to find any other work around in my testing.



    If this doesn't help then I am out of ideas, perhaps someone else can offer up ideas or you can contact support and provide them your project files.