Hello there,
I’m totally new to Appium.
I have used Appium Desktop to record a scenario on iOS.
Appium Desktop generate some code which looks like :
require 'rubygems’
require ‘appium_lib’
caps = {}
caps["platformName"] = "iOS"
caps["deviceName"] = "iPhone Simulator"
caps["platformVersion"] = "11.0"
caps["bundleId"] = "[bundleIdOfMyApp]"
opts = {
sauce_username: nil,
server_url: "http://localhost:4723/wd/hub"
}
driver = Appium::Driver.new({caps: caps, appium_lib: opts}, true).start_driver
el1 = driver.find_elements(:accessibility_id, "[Name_of_element]")
el1.click
driver.quit
I assume that this code launch the application and perform a clic.
When I try “ruby [name_of_file]”, the application launches, but I have the following error : <main>': undefined method
click’ for #Array:0x00007f (NoMethodError)
I am missing something ?
Appium-doctor says that everything looks good.
Thanks for your help