This is a migrated thread and some comments may be shown as answers.

Single thread Manager.Wait.For()?

1 Answer 23 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hubertus
Top achievements
Rank 1
Hubertus asked on 04 Nov 2015, 11:48 AM

Dear community!

 We are using VS13 and the Telerik Framework to test our web client. For finding controls or to wait for specific conditions to be met, we wanted to use ArtOfTest.Common.WaitSync with the Manager.Wait.For<>(...). 

We want to use this because we can not be sure if our page is fully loaded at certain points, and this Wait.For would be better than a stupid Thread.Sleep, because we can do things like refreshing the DOM tree each time the predicate is checked.

We experienced that there is a new Thread used for these WaitSynch methods.

Is there a way how to use the functionality of Wait.For<>(); without using different threads, to make the ​following code really wait until this method either times out or the predicate is true?

  

Best Regards

Hubertus

1 Answer, 1 is accepted

Sort by
0
Hubertus
Top achievements
Rank 1
answered on 06 Nov 2015, 11:12 AM

Dear community! 

After some research we've found out that this was only the case if we were running the code in the debug mode. For whatever reason this behaviour was not reproducable anymore even with the same code . I guess it was some sort of Visual Studio bug.

 

Best Regards 

Hubertus

Tags
General Discussions
Asked by
Hubertus
Top achievements
Rank 1
Answers by
Hubertus
Top achievements
Rank 1
Share this question
or