Hi,
I am using appium 1.4.13 to automate iOS native app using ruby. using ruby 2.1.2p95. I have a feature file, step definition file and env.rb. I run appium server using appium & in one terminal window and run test with command cucumber -r step_definitions -r support xxxxxxx.feature in other terminal window.
server shows successfully connected to appium but when I run command then it shows error-
‘undefined method driver_quit' for #<Selenium::WebDriver::Driver:0x..fa473664d647e26ee browser=:iOS> (NoMethodError) /Users/pk/.rvm/gems/ruby-2.1.2/gems/appium_lib-8.0.0/lib/appium_lib/driver.rb:295:in
initialize’
/Users/pk/appium/features/support/env.rb:36:in new' /Users/pk/appium/features/support/env.rb:36:in
<top (required)>’
/Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/rb_support/rb_language.rb:95:in load' /Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/rb_support/rb_language.rb:95:in
load_code_file’
/Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:180:in load_file' /Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:83:in
block in load_files!’
/Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:82:in each' /Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/runtime/support_code.rb:82:in
load_files!’
/Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:184:in load_step_definitions' /Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/runtime.rb:42:in
run!’
/Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/lib/cucumber/cli/main.rb:47:in execute!' /Users/pk/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.19/bin/cucumber:13:in
<top (required)>’
/Users/pk/.rvm/gems/ruby-2.1.2/bin/cucumber:23:in load' /Users/pk/.rvm/gems/ruby-2.1.2/bin/cucumber:23:in
‘’.
this is my env.rb file-
require ‘selenium-webdriver’
require ‘rspec/expectations’
require ‘rspec’
require ‘Rack’
require ‘json’
require ‘timeout’
require ‘rubygems’
require ‘appium_lib’
APP_PATH = ‘…/…/xx.app’
def absolute_app_path
File.join(File.dirname(FILE), APP_PATH)
end
def server_url
“http://127.0.0.1:4723/wd/hub”
end
def selenium
capabilities =
{
‘appium-version’ => ‘1.0’,
‘app’ => absolute_app_path,
‘deviceName’ => ‘=iPhone 5’,
‘platformName’ => ‘iOS’,
‘platformVersion’ => ‘7.1’,
‘autoLaunch’ => ‘true’,
‘udid’ => ‘0d3aee3ba904fafc2dd89e97a89f6a00728eb88d’,
‘bundleId’ => ‘com.pp.xx.debug’
}
$driver ||= Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities, :url => server_url)
end
Appium::Driver.new(caps: selenium.capabilities).start_driver
Appium.promote_appium_methods Object
this is my gem list in case it is required to look into this matter-
actionmailer (4.2.4, 4.2.1, 4.1.7, 4.1.6, 4.0.2)
actionpack (4.2.4, 4.2.1, 4.1.7, 4.1.6, 4.0.2)
actionview (4.2.4, 4.2.1, 4.1.7, 4.1.6)
activejob (4.2.4, 4.2.1)
activemodel (4.2.4, 4.2.1, 4.2.0, 4.1.7, 4.1.6, 4.0.2)
activerecord (4.2.4, 4.2.1, 4.2.0, 4.1.7, 4.1.6, 4.0.2)
activerecord-deprecated_finders (1.0.4, 1.0.3)
activesupport (4.2.4, 4.2.3, 4.2.1, 4.2.0, 4.1.7, 4.1.6, 4.0.2)
appium_lib (8.0.0)
arel (6.0.3, 6.0.0, 5.0.1.20140414130214, 4.0.2)
awesome_print (1.6.1, 1.2.0)
bigdecimal (1.2.7, 1.2.5, 1.2.4)
blankslate (3.1.3, 2.1.2.4)
builder (3.2.2, 3.1.4)
bundler (1.10.6, 1.9.6, 1.8.2, 1.7.6, 1.7.3, 1.6.2)
bundler-unload (1.0.2)
calabash-android (0.5.14, 0.5.8, 0.5.7, 0.5.4, 0.4.20)
calabash-common (0.0.2, 0.0.1)
calabash-cucumber (0.16.4, 0.14.1, 0.12.3, 0.11.4, 0.10.0, 0.9.169)
CFPropertyList (2.3.2, 2.3.1, 2.3.0, 2.2.8)
childprocess (0.5.7, 0.5.6, 0.5.5, 0.5.3, 0.3.9)
claide (0.9.1, 0.8.1)
cocoapods (0.39.0, 0.38.2, 0.37.2)
cocoapods-core (0.39.0, 0.38.2, 0.37.2)
cocoapods-downloader (0.9.3, 0.9.1, 0.9.0)
cocoapods-plugins (0.4.2)
cocoapods-search (0.1.0)
cocoapods-stats (0.6.2, 0.6.1, 0.5.3)
cocoapods-trunk (0.6.4, 0.6.1)
cocoapods-try (0.5.1, 0.4.5)
colored (1.2)
command_runner_ng (0.1.0, 0.0.2)
cucumber (1.3.19, 1.3.5)
cucumber-core (1.3.0, 1.1.3)
curb (0.8.8, 0.8.6, 0.8.1)
debase (0.2.1, 0.1.3, 0.1.2, 0.0.9)
debase-ruby_core_source (0.8.0, 0.7.10, 0.7.9, 0.7.5)
debugger-ruby_core_source (1.3.8)
diff-lcs (1.2.5, 1.2.4)
domain_name (0.5.25, 0.5.24, 0.5.23)
edn (1.1.0, 1.0.6)
erubis (2.7.0)
escape (0.0.4)
executable-hooks (1.3.2)
ffi (1.9.10, 1.9.8, 1.9.6, 1.9.3, 1.9.0)
fuzzy_match (2.1.0, 2.0.4)
gem-wrappers (1.2.7, 1.2.5, 1.2.4)
geocoder (1.2.11, 1.2.8, 1.2.7, 1.2.6, 1.2.5, 1.1.9)
gherkin (2.12.2, 2.12.1)
gherkin3 (3.1.2, 3.1.1)
globalid (0.3.6, 0.3.5)
hike (2.1.3, 1.2.3)
http-cookie (1.0.2)
httpclient (2.6.0.1, 2.5.3.2, 2.4.0, 2.3.4.1)
i18n (0.7.0, 0.6.11)
io-console (0.4.2)
json (1.8.3, 1.8.2, 1.8.1)
json-compare (0.1.8)
loofah (2.0.3, 2.0.2)
macaddr (1.7.1, 1.6.7)
mail (2.6.3, 2.6.1, 2.5.4)
mime-types (2.6.2, 2.5, 2.4.3, 2.3, 1.25.1, 1.25)
mini_portile (0.6.2)
minitest (5.8.1, 5.6.1, 5.5.1, 5.4.3, 5.4.1, 4.7.5)
molinillo (0.4.0, 0.3.1, 0.2.3)
multi_json (1.11.2, 1.11.0, 1.10.1, 1.7.7)
multi_test (0.1.2, 0.1.1, 0.0.2)
nap (1.0.0, 0.8.0)
netrc (0.10.3, 0.10.2, 0.8.0, 0.7.9, 0.7.8, 0.7.7)
nokogiri (1.6.6.2)
parslet (1.7.1, 1.5.0)
polyglot (0.3.5)
power_assert (0.2.4, 0.2.3, 0.2.2, 0.2.0, 0.1.3)
psych (2.0.15, 2.0.13, 2.0.6, 2.0.5)
rack (1.6.4, 1.6.1, 1.6.0, 1.6.0.beta, 1.5.2)
rack-protection (1.5.3)
rack-test (0.6.3, 0.6.2)
rails (4.2.4, 4.2.1, 4.1.7, 4.1.6, 4.0.2)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.7, 1.0.6)
rails-html-sanitizer (1.0.2)
railties (4.2.4, 4.2.1, 4.1.7, 4.1.6, 4.0.2)
rake (10.4.2, 10.3.2, 10.1.0)
rdoc (4.2.0, 4.1.2, 4.1.0)
rest-client (1.8.0, 1.7.3, 1.7.2, 1.6.8, 1.6.7)
rest_client (1.8.3, 1.8.2)
retriable (2.1.0, 2.0.2, 1.4.1, 1.3.3.1)
rspec (3.3.0, 3.2.0, 3.1.0, 3.0.0, 2.14.1)
rspec-core (3.3.2, 3.2.3, 3.2.0, 3.1.7, 3.1.4, 3.0.4, 2.14.8, 2.14.4)
rspec-expectations (3.3.1, 3.2.1, 3.2.0, 3.1.2, 3.1.1, 3.0.4, 2.14.5, 2.14.0)
rspec-mocks (3.3.2, 3.2.1, 3.2.0, 3.1.3, 3.1.1, 3.0.4, 2.14.6, 2.14.2)
rspec-support (3.3.0, 3.2.2, 3.2.1, 3.1.2, 3.1.0, 3.0.4)
ruby-debug-ide (0.6.0, 0.4.30, 0.4.27, 0.4.23.beta1)
rubygems-bundler (1.4.4)
rubygems-update (2.4.8, 2.4.6, 2.4.3, 2.4.1)
rubyzip (1.1.7, 1.1.6, 1.0.0, 0.9.9)
run_loop (1.5.6, 1.5.5, 1.3.2, 1.2.9, 1.2.6, 1.1.0, 1.0.2, 0.2.1)
rvm (1.11.3.9)
selenium-webdriver (2.48.1, 2.47.1, 2.45.0, 2.44.0, 2.43.0, 2.37.0, 2.35.1)
sim_launcher (0.5.0, 0.4.13, 0.4.11)
sinatra (1.4.6, 1.4.5)
slowhandcuke (0.0.3)
sprockets (3.4.0, 3.3.5, 3.0.3, 2.12.3, 2.12.2)
sprockets-rails (2.3.3, 2.3.0, 2.2.4, 2.2.0, 2.1.4, 2.0.1)
systemu (2.6.5, 2.6.4)
test-unit (3.1.5, 3.1.4, 3.0.9, 3.0.6, 3.0.1, 2.1.2.0)
thor (0.19.1)
thread_safe (0.3.5, 0.3.4)
tilt (2.0.1, 1.4.1)
toml (0.1.2)
treetop (1.6.3, 1.6.2, 1.5.3, 1.4.15)
tzinfo (1.2.2, 0.3.44, 0.3.43, 0.3.41)
unf (0.1.4)
unf_ext (0.0.7.1, 0.0.6)
uuid (2.3.8, 2.3.7, 2.3.5)
websocket (1.2.2, 1.2.1, 1.0.7)
xamarin-test-cloud (1.1.2, 1.1.1, 1.0.0, 0.9.38, 0.9.37, 0.9.34)
xcodeproj (0.28.2, 0.28.0, 0.26.3, 0.24.2)
yajl-ruby (1.2.1)
Please let me know what is incorrect here?
thanks in advance