How to type into password field on the iOS platform?

As title mentioned I have been trying to type into the Password field for the iOS real device(Browserstack) but appium script is not filling any value. It is not throwing any error but it is not filling a value, however this works with iOS simulators.

I have already tried setValue() and addValue() in and also I made same script in Java and Python but I am getting same behaviour.

iOS Platform: 15.2 (Simulator)
Device Name: iPhone 13 Pro
Appium Version: v1.22.3
Language: NodeJS (WebdriverIO), Also tried with Java and Python
Mac OS: Monterey 12.4

Tried the following codes to type the value in the password input field:

await $('//XCUIElementTypeSecureTextField').click(); 
await $('//XCUIElementTypeSecureTextField').addValue('123456');

Below is the XML hierarchy:

Any suggestion or help would be really helpful!


You should try SendKeys:

Hi @wreed, I have tried that already in Java and Python. In we use setValue(value) to send a sequence of key strokes to an element.

try with:

new Actions(driver).sendKeys(text).perform();

Also after tap on this input native keyboard shown correct?