Im having an issue where the keyboard isnt minimising after calling send_keys to an element and its blocking screen elements and causing tests to fail.
is there a way to close the keyboard with an appium call?
if not what would be a good way to do this without adding a massive amount of calls (eg search for keyboard after every send keys, if visible minimise, check minimised)?
what would the ruby equiv be for findElements(MobileBy.className(“blah blah”))?
EDIT**
ok so I’ve used this method and its working well.
ok so I’ve used this method and its working well.
def hide_keyboard
begin
log “Hiding the keyboard”
keys = $driver.find_elements(:class_name, “XCUIElementTypeKeyboard”)
.find_elements(:class_name, “XCUIElementTypeButton”)
keys[keys.length - 1].click
rescue StandardError
log “No keyboard visible to hide!”
end
end