I have a problem with typing of special characters into a text field. Usually, I call the function:

UIATarget.localTarget().frontMostApp().typeString("ANYTHING");

But, if there is a character like é to type, it isn´t able to locate it on keyboard. This character can be typed by tapping and holding the e key on the keyboard. Is there another way? Maybe, something like, setting the value of the text field. The text field can be accessed through the index:

UIATarget.localTarget().frontMostApp().mainWindow().searchBars()[0].tap();
有帮助吗?

解决方案

UIATarget.localTarget().frontMostApp().mainWindow().searchBars()[0].tap();
UIATarget.localTarget().frontMostApp().mainWindow().searchBars()[0]
    .setValue("é & á");
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top