Hey there! I am brand new using Appium and I have been working off the APK in the getting started section.
I am looking to test text entry using the API Demos file at http://appium.io/docs/en/about-appium/getting-started/
I converted over to Ruby as that is my language of choice and made a few changes so I can run over wifi. I am trying to go to the OS\Morse Code section and when the keyboard pops up type in some text and then hit the ‘vibrate’ button to test some basic text entry.
Can anyone help me with this syntax? I know get_keyboard.send_keys line is most likely wrong, I am just unsure of what to use in its place
require 'appium_lib'
desired_caps = {
host: '192.168.1.119',
port: 5555,
caps: {
platformName: "Android",
platformVersion: "7.1.1",
deviceName: "0815f89369ea0604",
appPackage: "io.appium.android.apis",
appActivity: "io.appium.android.apis.ApiDemos",
}
}
driver = Appium::Driver.new(desired_caps, true)
driver.start_driver
driver.find_element(:accessibility_id, 'App').click
driver.find_element(:accessibility_id, 'Alert Dialogs').click
driver.back()
driver.back()
driver.find_element(:accessibility_id, 'Graphics').click
driver.find_element(:accessibility_id, 'Arcs').click
driver.back()
driver.back()
driver.find_element(:accessibility_id, 'OS').click
driver.find_element(:accessibility_id, 'Morse Code').click
driver.get_keyboard.send_keys("Hello World")
driver.find_element(:accessibility_id, 'vibrate').click
driver.driver_quit