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

version 2.1.1 killed appium? #419

Open
eskignax opened this issue Mar 14, 2017 · 4 comments
Open

version 2.1.1 killed appium? #419

eskignax opened this issue Mar 14, 2017 · 4 comments

Comments

@eskignax
Copy link

Hello,

I have a project that test mobile app with Appium and page-object. Until the version 2.1.1 of page-object, everything was fine we just use that code to make it works together:

env.rb:
$browser = Appium::Driver.new(desired_caps).start_driver

hook.rb:
Before do @browser = $browser end

But with the version 2.1.1 the trick doesn't work anymore and now methods are not implemented:

log:

Selenium::WebDriver::Error::UnknownError: Method has not yet been implemented
(eval):1:in `process_watir_call'
./lib/pages/search_job_page.rb:9:in `search'
./features/step_definitions/search_steps.rb.rb:2:in `/^I make a dummy search$/'
./features/dummy_search.feature:5:in `When I make a dummy search'

class:

class SearchJobPage
  include PageObject

  text_field :what, id: 'what_input'
  text_field :where, id: 'where_input'
  button :job_search, xpath: '(//android.widget.Button)[0]'

  def search(data={})
    self.what= 'dummy'
    self.where= 'search'
    job_search
  end

end

Questions:
Is this happen because of the drop of selenium-driver or there is a real bug behind ?
How to avoid this error?

Thank you

@cheezy
Copy link
Owner

cheezy commented Mar 15, 2017 via email

@cheezy
Copy link
Owner

cheezy commented Mar 21, 2017 via email

@eskignax
Copy link
Author

eskignax commented Mar 22, 2017

Hello Cheezy, thank you for your time.

I can see it's work when testing on a browser on mobile phone.
The problem is when I am testing a mobile application.

I make this project to train my skill in mobile app testing:
https://github.com/eskignax/indeed_testing_app

login_page.rb:

 element :login_without_account, 'android.view.View', id: 'appSignInDismiss'
 button :create_account, id: 'appSignInCreate'

with page-object 2.0.0
calling login_without_account works
calling create_account raise the error

 Selenium::WebDriver::Error::NoSuchElementError: An element could not be located on the page using the given search parameters.

Which is normal since the element doesn't exist in that page. (but if the element exist, it works)

with page-object 2.1.1
calling login_without_account raise the error:

NameError: undefined local variable or method `android' for #<Watir::Browser:0x..f8d6a464e closed=false>
./lib/pages/login_page.rb:8:in `login_guest'
./features/step_definitions/user_steps.rb:2:in `/^I am a guest user$/'
./features/search.feature:4:in `Given I am a guest user'

calling create_account raise the error:

Selenium::WebDriver::Error::UnknownError: Method has not yet been implemented
(eval):1:in `process_watir_call'
./features/step_definitions/user_steps.rb:12:in `/^I click on Create account$/'
./features/account.feature:4:in `When I click on Create account'

I know that page-object wasn't design for mobile app testing, but still think it's useful to use it.

@PatrickDuncan
Copy link

Hello @cheezy, has there been any progress with this particular ticket? We're hoping to use your library with Appium to test mobile applications (outside of just the browser).

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

No branches or pull requests

3 participants