A call to Invoke() method(from System.Windows.Automation.InvokePattern) fails as soon as the system is locked. This behavior is seen after migrating our project to .NET 4.5.2. Whereas in .NET 4.0 the call used to work even when system was locked.
The dll used is UIAutomationClient.dll, v4.0.0.0.
The exception I get is:
System.InvalidOperationException was unhandled by user code Message=Operation is not valid due to the current state of the object.
I know GUI testing with UIA usually needs the system to be unlocked.Since this call was working when the system is locked in .NET 4.0, I would like to have the same behavior after migration.