IOS hybrid app cannot send keys in webview

My app is hybrid, I can changing context Native app to Webview but I cant do send keys btw I can do click and setting values in dropdown menus, why I can’t send keys in input box?

Thanks for your answer…

try tap on it and send text with appeared keyboard:

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

I tried this but no working for me and I need a lot of help btw I taking element as a WebElement is that any problem because im working on webview ? And I want to try tap but this element must be webelement :frowning:

i had an issue in my app on ios (another thread i’m running here is how the embedded webview on android is super painful too) but i solved the entry of a form on ios in the browser by calling the switch-to and then writing a waiting loop that waits for the current context to actually be webview. And then like @Aleksei hinted. click on the control before I enter text.

Note that text entry enters the entire string by default instead of character-by character (unless you are running a test in the simulator) but it looks like it’s not selecting the element, try select the element and sleep for a moment? that may yield some clues as to if the app has some JS web calls that runs and makes text entry impossible while the OnFocus() handler runs.

Yes you are right I tried click after sendkeys but not working for me :frowning: I got half solution firstly manuel click textbox after I used getKeyboard().sendKeys() but I need to automatically click textbox.

1 Like