Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotImplementedError (NotImplementedError) #3

Closed
YaredTse opened this issue Aug 5, 2014 · 6 comments
Closed

NotImplementedError (NotImplementedError) #3

YaredTse opened this issue Aug 5, 2014 · 6 comments
Labels

Comments

@YaredTse
Copy link

YaredTse commented Aug 5, 2014

Hi

I am the folowing set up in terms of Gems on my local machine,

appium_capybara (0.0.2)
  appium_lib (~> 4, >= 4.1.0)
  capybara (~> 2.4, >= 2.4.1)
appium_lib (4.1.0)
  awesome_print (~> 1.2, >= 1.2.0)
  json (~> 1.8, >= 1.8.1)
  nokogiri (~> 1.6.1)
  selenium-webdriver (~> 2.41, >= 2.41.0)
  toml (~> 0.0, >= 0.0.4)
awesome_print (1.2.0)
blankslate (2.1.2.4)
builder (3.2.2)
capybara (2.4.1)
  mime-types (>= 1.16)
  nokogiri (>= 1.3.3)
  rack (>= 1.0.0)
  rack-test (>= 0.5.4)
  xpath (~> 2.0)
site_prism (2.6)
  addressable (~> 2.3.3)
  capybara (>= 2.1, < 3.0)

And when I execute a step I get the following error,

Given I am on the homepage                                  # features/step_definitions/navigation_steps.rb:1
  NotImplementedError (NotImplementedError)
  ./features/step_definitions/navigation_steps.rb:2:in `/^I am on the homepage$/'

Step definition

Given(/^I am on the homepage$/) do
home_page.load
end

Conection to the appium selenium driver:

require 'appium_capybara'

desired_caps_ios = {
  :platformName => "Android",
  :browserName => "chrome",
  :deviceName => "Android"
}

url = "http://localhost:4723/wd/hub"

Capybara.register_driver(:appium) do |app|
  appium_lib_options = {
    server_url: url
  }
  all_options = {
    appium_lib:  appium_lib_options,
    caps:        desired_caps_ios
  }
  Appium::Capybara::Driver.new app, all_options
end

Capybara.default_driver = :appium

I suspect is the load method. I have changed it to visit method and I get the same error.

@bootstraponline
Copy link
Member

That seems like a bug. @sbonebrake do we need to add support for load/visit?

@sbonebrake
Copy link
Contributor

Not really sure what we want the equivalent of driver.visit to be. What do you think the equivalent in appium_lib is? I suppose i could just implement it as empty so we stop throwing the exception.

For now, try just calling the page constructor directly. Page::HomePage.new

@bootstraponline
Copy link
Member

visit in capybara is used to navigate to a URL. It doesn't make sense at all for mobile. We should probably raise an error explaining this.

@bootstraponline
Copy link
Member

Alternative:

$driver.driver.navigate.to 'some url'

That'll probably work for automating a web app on mobile.

@bootstraponline
Copy link
Member

be07877

@sbonebrake
Copy link
Contributor

Added the better error messaging in 0.0.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants