appium / ruby_lib

:gem: Ruby library for Appium
http://rubygems.org/gems/appium_lib
216 stars 160 forks source link

Cannot create instance of the driver #1012

Closed Artem-applitools closed 8 months ago

Artem-applitools commented 8 months ago

This is a

Summary

Getting an error on driver instance creation. Issue happens even before driver.start_driver

Environment

Actual behaviour and steps to reproduce

Driver instance not created and throwing an error about undefined method `export_session'. Which was removed from the latest version of the appium_lib_core.

Expected behaviour

Driver instance should be created without errors. Gemspec for the lib version should contain compatible appium_lib_core range of versions

Ruby logs

1.1) Failure/Error: driver = Appium::Driver.new({caps: caps, appium_lib: { server_url: 'https://ondemand.us-west-1.saucelabs.com:443/wd/hub' } }, false)

          NoMethodError:
            undefined method `export_session' for #<Appium::Core::Driver:0x000000010b4dcce8 @delegate_target=#<Appium::Core::Driver:0x000000010b4dcce8 ...>, @automation_name=nil, @custom_url="https://ondemand.us-west-1.saucelabs.com:443/wd/hub", @caps=#<Appium::Core::Base::Capabilities:0x000000010b4dc6a8 @capabilities={:browserName=>"", :platformName=>"Android", :"appium:platformVersion"=>"11.0", :"appium:newCommandTimeout"=>600, :"appium:app"=>"storage:filename=SimpleRandomStock_classic.apk", :"appium:deviceName"=>"Google Pixel 5 GoogleAPI Emulator", :"appium:automationName"=>"UiAutomator2", :"appium:orientation"=>"PORTRAIT", :"appium:autoGrantPermissions"=>true, :"sauce:options"=>{:username=>"***", :accessKey=>"***", :name=>"Support Matrix Ruby"}}>, @enable_idempotency_header=true, @default_wait=nil, @port=4723, @wait_timeout=30, @wait_interval=0.5, @listener=nil, @direct_connect=true, @device=:android>
          # /Users/artem/.rvm/gems/ruby-3.2.2/gems/appium_lib-13.0.1/lib/appium_lib/driver.rb:171:in `initialize'
          # ./spec/appium_helper.rb:5:in `new'
          # ./spec/appium_helper.rb:5:in `block (2 levels) in <top (required)>'
          # ./spec/appium_helper.rb:64:in `block (2 levels) in <top (required)>'
KazuCocoa commented 8 months ago

Thank you for the report. I have submitted a new minor 13.0.2 which limits the core lib version right now.