16

I am trying automated tests using Appium.

Every time Appium launches , it resets the properties of Simulator.

Nischay Gulati
  • 243
  • 3
  • 12
  • Would it work to just turn off autocorrect for the text fields in your app? – mginn May 20 '15 at 19:54
  • As its a part of automation testing , and in production ready app we don't turn off the autocorrect. So that wouldn't work. We want to simulate exact scenario without making changes to the app package. – Nischay Gulati May 25 '15 at 04:54

3 Answers3

25

Launch iOS Simulator.app and then select the device you want to boot.

From the home screen, launch Settings. Select General, then Keyboard. In the Keyboard Settings, disable Auto-Correct:

enter image description here

Jeremy Huddleston Sequoia
  • 22,938
  • 5
  • 78
  • 86
1

You can turn-off autocorrection in your computer, that is

System Preferences -> Keyboard -> TextTurn off Autocorrect

This should turn off autocorrect everywhere in that specific computer.

Now, if you don't want to turn it off everywhere, you can go to the attributes inspector for each textfield and turn it off.

Turn off autocorrection for UITexField

Boris
  • 11,373
  • 2
  • 33
  • 35
  • But first option doesn't work for iOS simulator. And practically for test automation 2nd option is not viable as most of the automation cases should be performed on production ready app package. – Nischay Gulati May 20 '15 at 19:49
  • any option to completely switch it off in app ? – Nischay Gulati May 20 '15 at 19:49
  • I've successfully used the second option without problems using test automation (not with Appium) since iOS apps inherits those features from the device it's running, the other option, is going to Settings in the simulator and turn all the switches off, but if it's resetting all the properties I don't think it would work. – Boris May 20 '15 at 20:03
-1

Just enter numbers instead of letters and you won't have that problem.

NSNoob
  • 5,548
  • 6
  • 41
  • 54
  • wow, this is a really good idea. Auto correct has been causing us grief in UITests for a long time and this is a perfect workaround for us – Robert Wagstaff Mar 02 '17 at 22:57