Reputation: 1
I need to send a text into a textfield with hint text.
The code i tried
var button = $("#button");
button.click();
var input = $("#input");
input.sendKeys("hello");
However it return me sendKeys is not a function. May i know is there any solutions for this? Thanks in advance.
Upvotes: 0
Views: 1468
Reputation: 2881
As per appium official documentation for Javascript, you can use addValue
function in webdriver.io and type
in webdriver. Please have a look on below code snippet.
// webdriver.io example
$("~SomeAccessibilityId").addValue("Enter");
// wd example
let element = await driver.elementByAccessibilityId("SomeAccessibilityID");
await element.type("Hello world!")
Upvotes: 1