1

I'm learning test automation with Cucumber and Appium, the Cucumber part works perfectly fine by itself, no issues or anything, but when trying to run tests with Appium I get this error on cmd:

uninitialized constant Selenium::WebDriver::DriverExtensions::HasRemoteStatus

        include ::Selenium::WebDriver::DriverExtensions::HasRemoteStatus
                                                       ^^^^^^^^^^^^^^^^^ (NameError)

I have no idea what could even be the problem, if it's something in my code (probably not since it's pretty much a copy-paste from a video that actually works), if there's something I need to install, or update, or whatever. This started only after I added a env.rb file to my framework with some code that I somewhat understand from said video, so here's the env.rb code:

require "appium_lib"

def caps
{ caps: {
    deviceName:"Anyname",
    platformName:" Android",
    app: (File.join(File.dirname(__FILE__), "PreciseUnitConversion.apk")),
    appPackage: "com.ba.universalconverter",
    appActivity: "MainConverterActivity",
    newCommandTimeout: "3600"
}}
end

Appium::Driver.new(caps, true)
Appium.promote_appium_methods Object

There are unanswered questions from over a year ago in this course I'm doing so I don't think the creator will be of help unfortunaly...

Rajagopalan
  • 5,465
  • 2
  • 11
  • 29
JUH4Z
  • 23
  • 3

1 Answers1

0

i just edited

C:\Ruby31\lib\ruby\gems\3.1.0\gems\appium_lib_core-5.0.3\lib\appium_lib_core\common\base\driver.rb

commented the lines with:

include ::Selenium::WebDriver::DriverExtensions::HasRemoteStatus

and

include ::Selenium::WebDriver::DriverExtensions::HasWebStorage

And now it works