I am using XCUITest to test UI behaviour when the keyboard is present - for example, if content properly moves up when the keyboard appears.
For some reason, the iOS simulator insists on regularly just disabling the software keyboard. Sometimes while the simulator is restarted, but sometimes even just when switching textfields in the middle of a test.
Is there a way to always force the software keyboard in the simulator? e.g. a command line argument or a property on XCUIDevice? I am running these tests on a CI, so manually enabling the software keyboard in the simulator is not an option.
Apple's XCUITest library is only available on iOS simulators and devices that are running iOS 9.3 or higher. A Mac computer with macOS 10.11 or 10.12 is required. Xcode 7 or higher is required. The XCUITest driver was available in Appium starting with Appium 1.6.
Select the iOS simulator window by click it. Click the simulator menu Hardware —> Keyboard, check the Connect Hardware Keyboard sub-menu, and then uncheck it at once. Now the keyboard will be prompted automatically when you click the text field or text view UI component in the iOS simulator. 2.
Click the simulator menu Hardware —> Keyboard, check the Connect Hardware Keyboard sub-menu, and then uncheck it at once. Now the keyboard will be prompted automatically when you click the text field or text view UI component in the iOS simulator. 2. Fix iOS Simulator Keyboard Hidden Issue Method Two.
Appium's XCUITest driver manages WDA as a subprocess opaque to the Appium user, proxies commands to/from WDA, and provides a host of additional functionality (like simulator management and other methods, for example). Development of the XCUITest driver happens at the appium-xcuitest-driver repo. In addition to Appium's general requirements:
I added a prescript in Xcode. It writes defaults ConnectHardwareKeyboard NO to ~/Library/Preferences/com.apple.iphonesimulator.plist file AND quits the Simulator. Quitting simulator is important because when the tests relaunch the simulator, only then it takes into account the defaults value we wrote.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With