when I run above code I am getting following output with error
C:\Users\Shreyas\Desktop>ruby Appium_hide_keyboard.rb
Class of driver is : Selenium::WebDriver::Driver
C:/Ruby193/lib/ruby/gems/1.9.1/gems/appium_lib-6.0.0/lib/appium_lib/device/device.rb:194:in `hide_keyboard': undefined method `device_is_android?' for #<Selenium::WebDriver::Driver:0x42580d2a browser=:Android> (NoMethodError)
from Appium_hide_keyboard.rb:16:in `<main>'
I tried using hide_keyboard(‘Finished’) still I am getting same error
In appium_lib there is file device.rb line no.48-54 gives following info.
# @!method hide_keyboard
# Hide the onscreen keyboard
# @param close_key (String) the name of the key which closes the keyboard.
# Defaults to 'Done'.
# ```ruby
# hide_keyboard # Close a keyboard with the 'Done' button
# hide_keyboard('Finished') # Close a keyboard with the 'Finished' button
My keyboard niter have ‘Done’ nor ‘Finished’ button
$driver.navigate().back()
Above code helps me to hide keyboard by pressing back button of device.