When I run my UI Tests with parallel execution enabled, multiple clones of an existing simulator (for example - iPad Air 2) are created to run different test suites.
In a Run Script from this StackOverflow answer, I am injecting a plist key "ConnectHardwareKeyboard" with the value false
to disable the hardware keyboard connection which is enabled by default when launching a simulator:
Hardware -> Keyboard -> Connect Hardware Keyboard
This script will set the value correctly for the existing simulators (iPad Air 2), but when the tests are executing in parallel, multiple clones of iPad Air 2 are created and the plists for the clones is not a clone from the original device. No flag is set in the cloned devices plists at all, but Hardware -> Keyboard -> Connect Hardware Keyboard is shown as selected.
This is causing my UI Tests to fail, because the keyboard is missing when I'm trying to dismiss the keyboard after typing test into a text field.
I have looked through many posts on StackOverflow and Apple Developer forums to try and resolve this issue but have not found anything. This must be a problem for other people... Has anyone out there had this same problem and/or found a solution?