Is it possible to “toggle software keyboard” via the code in UI test?

前端 未结 7 650
时光取名叫无心
时光取名叫无心 2020-12-24 03:25

I have UI tests which testing login functionality (and uses it to test other stuff), but sometimes when focus is changed from one field to another - the keyboard hides, and

7条回答
  •  抹茶落季
    2020-12-24 04:08

    Prior to Xcode 9, you can work around this by disabling the hardware keyboard in Simulator.app which will cause the software keyboard to always be present. Eg:

    defaults write com.apple.iphonesimulator ConnectHardwareKeyboard -bool NO
    

提交回复
热议问题