So I'm using CodedUI to do some application testing, and I've got the test framework built out for the most part and everything individually seems to be working.
My issue is that events are happening before the application is entirely loaded, so it's essentially just clicking on a blank page.
I've used Playback.Wait(x) and that doesn't seem to do the trick.
I have also attempted to use, but most likely incorrectly, the WaitForControlExist() also with no real luck.
Extremely new to CodedUI, especially with what i'm using this for. So any help would be greatly appreciated.
EDIT as per comments below:
Inside CodedUITest1.cs
[TestMethod]
public void CodedUITestMethod1()
{
this.UIMap.LaunchSoapUI(); //I WANT TO WAIT FOR THIS TO FULLY LOAD BEFORE GOING TO FindAndClickCustomFitNoRetest()
this.UIMap.FindAndClickCustomFitNoRetest();
this.UIMap.ClickPlayBtn();
this.UIMap.EnterEmployeeID();
}
Inside UIMap.Designer.cs
public void LaunchSoapUI()
{
// Launch '%ProgramW6432%\SmartBear\SoapUI-5.3.0\bin\SoapUI-5.3.0.exe'
ApplicationUnderTest soapUI530Application = ApplicationUnderTest.Launch(this.LaunchSoapUIParams.ExePath, this.LaunchSoapUIParams.AlternateExePath);
WaitForAUTLoad(soapUI530Application, 120);
}
public void WaitForAUTLoad(ApplicationUnderTest aut, int WaitTimeOut)
{
Playback.PlaybackSettings.WaitForReadyLevel = WaitForReadyLevel.AllThreads;
aut.WaitForControlReady(WaitTimeOut * 1000);
Playback.PlaybackSettings.WaitForReadyLevel = WaitForReadyLevel.UIThreadOnly;
}
