Trying to automate clicking the SEARCH button in a soft keyboard

Hi.

I have tried using KeyCode, KeyEvent, sendKeys, co-ordinates, pressKey, etc.
I have tried to see if it was an ENTER key masquerading as a search key using meta, still no luck.

Nothing actually clicks the SEARCH (Magnifying glass) button in the Virtual Keyboard (soft Keyboard)

Can you please help?

EDIT: I am using Java/Selenium to run this in.

you are using android or iOS ?

Android, but I effectively want to try and make the code as generic as possible for use in both types of devices

Sam, have you collected the source of the screen? It should just be an id / class BUTTON or something… that should help you find it. Keyboards not only act differently between IOS and Android, but also different versions of both, so you may have to create a wrapper yourself.

Thanks Bennid, but it doesn’t work Uiautomatorviewer can’t tell me the source.

Is there any resolution here. I’m trying to click in the iOS Simulator keyboard.

I’m using Ruby in a native app. I check the keyboard is there and that works great. No problem finding the element on keybaord. I’m not understanding why a simple find_element(accessibility_id: keyboard_value).click doesn’t actually do anything. I get no failures on the find or click but nothing is actually happening in the simulator. The search button is not actually pressed to give me a result. Am I missing something here for iOS?