My symptoms seem to be very similar to this:
Windows SendInput (Keyboard) Not Working on Disconnect
But I am not running my own code. I am running recorded web tests, similar to what Selenium does, but this is run from the Telerik IDE.
I am not going to try to explain everything that Telerik's code does. The point is this. I am running on Mac OS. I use Remote Desktop to connect to a Windows system (Server 2012 R2).
If I start a test suite and leave the Windows UI frontmost, the tests pass. Reliably.
If I start a test suite and switch back to my Mac, the tests pass. Reliably.
But when I schedule a test suite for a future time and switch back to my Mac and more than 5 or 10 minutes go by before the tests run, the tests all fail.
But they only fail when they try to interact with the keyboard.
If the test is clicking on links or pasting text into a text field (which does not simulate a keyboard action), then those test steps succeed. But when it tries to actually type something in, it fails, consistently.
The failures look like:
InnerException:
System.ComponentModel.Win32Exception (0x80004005): SendInput: Failed. Win32Error:
at ArtOfTest.WebAii.Win32.Win32NativeMethods.SendInputInternal(Input[] inputData)
at ArtOfTest.WebAii.Win32.Mouse.Click(MouseClickType clickType, Int32 x, Int32 y, Int32 wheelDelta)
at ArtOfTest.WebAii.Win32.Mouse.Click(MouseClickType clickType, Int32 x, Int32 y, Int32 wheelDelta)
at ArtOfTest.WebAii.Win32.Mouse.Click(MouseClickType clickType, Point pointToClick)
at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DesktopActionDescriptor.Execute(Browser browser)
at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
I have a thought that I could run something in the Windows system that 'tickles' the UI and keeps it active. But that would be stupid. But do stupid things make things work? Sometimes.
Any other suggestions?
User contributions licensed under CC BY-SA 3.0