Reputation: 151
hello i'm working on ui-test nativescript, with the appium plugin, I would like to know how to insert text in a field, I notify that I have already tried
type("hello");
sendKeys("Text");
setValue("text");
getKeyboard().sendKeys("Text");
setText("text")
;
they return to me all, example for type("hello");
type is not a function
i added a screenshot for more details !
what is the good function to use ?
Upvotes: 0
Views: 1740
Reputation: 3658
My guess is that you are using nativescript- dev-appium, that is a wrapper over wd (node.js client for webdriver/appium)
This should work:
const element = await mascotteValue.element()
await element.sendKeys("text")
The error you face basically means there is not such function for ui-element
object and you can see all the available ones here.
Upvotes: 1