i am trying to check WinformsObject exists or not but the below code is not working
Log.Message("Window doesnt exists continue next step");
Solved! Go to Solution.
There are timing issues that can affect checking for Exists. Please take a look here:
Thanks and even i tried giving wait , but its not working
Keep in mind that Sys.Process('*') will return the first process it finds in the search... which may not be your application. You need to specify what process in order to detect the Winform.
Also... you say, "It's not working"... can you be more specific? What is happening? Any errors? What's in the log?
Actually, I would change your line of code to
var w = Sys.Process('myApp').WaitWinFormsObject("DisplayScheduleMessage", 1000);
Where you replace 'myApp' with the actual process name of your application under test. Sys.Process() will, again, not necessarily return your specific application.