I use a User32 API call to find the window
Code: Select all
FindWindow(String lpClassName, String lpWindowName)
Code: Select all
ElementRepository.CreateAdapterForPath<Element>(Path, timeout)
4 times out of 5 this works fine, but one time the application just stops to load and the splash screen is displayed forever until you kill the process.
I'm sure this is caused by Ranorex, because I just tried substituting the Ranorex code by simple Thread.Sleep (10000), and it worked 100 times out of 100 tries.