cancel
Showing results for 
Search instead for 
Did you mean: 

timeout while waiting for a window (such as explorer, etc).

Highlighted
Contributor

timeout while waiting for a window (such as explorer, etc).

I have a main method in C# using Visual Studio. The important part is

 

     public void reprice() {

        ...

        try

        {

              test1();

       }

       catch(Exception ex)

       {

              System.Diagnostics.Debug.WriteLine("place a break point here");

       }

       ...

}

 

with the expectation that anything in test1() causing an exception I can catch.  test1() has my Test Complete (12) code in it.  The entire test worked fine.

 

A teeny subset:

 

pubclic void test1() 

{

    ...

    Connect.NameMapping["Sys"]["Keys"]("[Hold][Win]e[Release]");
    wndCabinetWClass = explorer["wndCabinetWClass"];

}

 

the second line beginning with wnd depends on the [Win]e above it top open a windows explorer window.

 

To simulate an error, I commented out the Connect line.  When I run it, I get the message

"waiting for the wndCabinetWClass...", which is exactly what I would expect.  The problem is, it does not seem to time out.  It gives the message, and when the dots get to the end, it starts over again, and never seems to timeout.

 

As you can see from the attached picture, my auto wait timeout is 10000 ms (10 sec), but this thing is still waiting after minutes.  It takes a while for some windows to come up, but I would think 60 seconds is good enough.

 

I found a suggestion to do "Options.Run.Timeout = 30000;", however my code cannot find Options.

So I am not sure what to do.  I guess it will eventually time out when the test has reached its maximum time, but that could be 30 minutes.

Tags (2)
1 REPLY 1
Community Hero

Re: timeout while waiting for a window (such as explorer, etc).

Right... you're trying to access a TestComplete IDE object in a non-TestComplete environment.  I really am not sure what "Connect" does or is (I'm not a developer myself) but understand that running automation from Visual Studio IS supported by TestComplete, but you should run things in a different fashion.  See my comments in your other thread.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Extensions available
New Here?
Join us and watch the welcome video:
SeptemberNews
Top Kudoed Authors
Join the September Hub-bub to show off, learn and win