Reputation: 771
I am trying to delete a character in textField, using --keyboard_enter_char "Delete"-- and here is my code in step definition.
touch(query("textField")[0]) # touch the textField and bring up the keyboard, working
keyboard_enter_text("a") # enter "a" into the textField, working
keyboard_enter_char "delete" # I expect to see the "a" gone
So when keyboard_enter_char "delete"
is executed
I got an error
typing character 'delete' is not yet supported when running with Instruments (RuntimeError)
and script stops.
Could anyone tell me what am I doing wrong or how should I delete a char from textField
? Thank you!
Upvotes: 1
Views: 596
Reputation: 2480
As I mentioned in the Calabash iOS Forum post you made, the correct usage is:
keyboard_enter_char("Delete")
We have an open issue around touching the delete key.
Use UIAutomation JavaScript to touch keyboard Delete key #942
The :wait_after_char
suggested by Aravin will, mostly likely, have no effect.
Please don't cross post.
Upvotes: 1