I'll provide more explanation later today.
Shortly, the -IsCritical parameter is for managing test results only |make your test results RED).
By default, the Get-UIAWindow cmdlet uses the default timeout [UIAutomation.Preferences]::Timeout (by default, it equalts to 5000 milliseconds).
Cmdlet searches for a window and, if succeed, returns it in 5 or less seconds. You can provide a custom value for a single run:
Start-Process calc -PassThru | Get-UIAWindow -Seconds 1
Get-UIA[ControlType] cmdlets also support timeouts.
Sometimes, the schema (Start-Process app -PassThru | Get-UIAWindow) does not work, for example if a system is 64-bit and an app is 32-bit (an mmc snapin is a typical example).
It would be nice, if you put a screenshot somewhere (you should have in yout %TEMP% folder. Screenshots are saved, by default, on fail) or to run a spot instance at Amazon with your app? Now, I don't understand what the problemous control is.