appium / ruby_lib

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

bug: unable to create a driver without the `app` capability #1038

Closed eglitise closed 3 months ago

eglitise commented 3 months ago

This is a

Summary

When creating a driver by passing a capability set without the app capability, the driver fails to be created and returns an error:

absolute_app_path invoked and app is not set! (ArgumentError)

Could not reproduce this using ruby_lib 15.2.0 and identical versions of ruby_lib_core. I believe the issue was likely introduced in #1037.

Environment

Actual behaviour and steps to reproduce

Create a driver and pass a capability set that does NOT contain the app capability, e.g.

url = "http://localhost:4723/"
caps = {"platformName"=>"iOS", "appium:options"=>{"automationName"=>"XCUITest", "deviceName"=>"iPhone", "udid"=>"<udid>", "noReset"=>true, "forceAppLaunch"=>true, "bundleId"=>"<bundle id>"}}
$driver = Appium::Driver.new({ caps: caps, appium_lib: { server_url: url } })

This returns an error.

Expected behaviour

Driver is created fine

Link to Appium/Ruby logs

N/A

Any additional comments

N/A

KazuCocoa commented 3 months ago

Yes, it looks like ruby_lib's historical place reason. Let me fix that.

KazuCocoa commented 3 months ago

Could you try out with 15.2.2?

eglitise commented 3 months ago

Working fine now, thanks 👌