I am testing my app. There I have a textfield, where first I enter letters, then I change keyboard to numbers and enter numbers, so that I get a string qwerty123
. But UIAutomation doesn't understand this. When I run this script it says "tap point object is required"
at the line "target.frontMostApp().keyboard().typeString("qwerty123\n");"
How can I explain to it that the keyboard has changed?
Asked
Active
Viewed 2,483 times
2
2 Answers
0
To set any string, just use the following:
window.secureTextFields()[0].setValue(""); //Sets textfield to empty.
app.keyboard().typeString(qwerty123); //Type any string you want
app.keyboard().typeString("\n"); //Press 'Enter'. Also can go in the above line.

Domeniconi
- 11
- 1
0
You can set the textfield value with setValue which will bring the keyboard window and tap the done element in the keyboard
textfield.setValue(addressLink);
target.frontMostApp().keyboard().elements()["done"].tap();
You can also do following
target.frontMostApp().keyboard().elements()["q"].tap();
target.frontMostApp().keyboard().elements()["w"].tap();
target.frontMostApp().keyboard().elements()["more"].tap();
target.frontMostApp().keyboard().elements()["1"].tap();
target.frontMostApp().keyboard().elements()["2"].tap();
target.frontMostApp().keyboard().elements()["done"].tap();

user1168832
- 71
- 6
-
It's case sensitive. It should be "Done", not "done" – neo Nov 18 '13 at 17:43