require 'rubygems'
require 'appium_lib'
desired_caps = {
caps: {
platformName: 'iOS',
platformVersion: '11.4',
deviceName: 'iPhone 7',
app: Path,
automationName: 'XCUITest',
},
appium_lib: {
sauce_username: nil,
sauce_access_key: nil,
wait: 60
}
}
driver = Appium::Driver.new(desired_caps)
Appium.promote_appium_methods AppiumWorld
driver.start_driver
#login test class
#find the email textfield
def email(driver)
return driver.find_element(:name, "Email")
end
#find the password textfield
def password(driver)
return driver.find_element(:name, "Password")
end
#find the login button
def loginButton(driver)
return driver.find_element(:name, "Login")
end
#find Forgot Password button
def forgotPasswordButton(driver)
return driver.find_element(:name, "Forgot Password?")
end
#find Don't have an account button
def forgotAccountButton(driver)
return driver.find_element(:name, "Don't have an account?")
end
$driver.driver_quit
I haven't included the path but it is correct. I have installed all the gems needed, the only dependency for ruby to run appium ruby test is appium_lib which I have installed. I want to just make sure that I have the 2 required textfields for email and password and 3 button that include the login, forgot password, and the don't have an account button. Here is the error that I am getting, I can't seem to find a solution to this error:
Traceback (most recent call last):
2: from loginScreenTest.rb:2:in `<main>'
1: from /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- appium_lib (LoadError
)