Looking for Page Object Model Samples for Ruby/Cucumber

Hey there,
My goal is to implement Page Objects for my tests. I’m using the Ruby/Cucumber gherkin framework.
I’ve been parusing the existing posts here and in the old appium-discuss.

The only thing I saw was this thread:


Didn’t know if there was any other Appium Ruby page object samples people had around. I see snippets when I do some searches.

Any help much appreciated.


Thank you very much!

Hi bootstraponline,
Got some time to revisit this.
So I’m working from the appium.txt ruby/cucumber model. Again, desire is to get some page objects implemented.

I began Reading: http://sauceio.com/index.php/tag/appium-bootcamp/ > A Page Objects primer.
Conceptually, things seem to make sense.

Where it states in the above documentation, “…Let’s go ahead and update our test to use these page objects.” it refers to a navigation_spec.rb. I’m using the standard env.rb that was from the github source.

Here’s the current env.rb. I’ve annotated what I believe I need to start doing below in ***** Stars *** . Let me know if this is on the right track.

require ‘rspec/expectations’
require ‘appium_lib’
require ‘cucumber/ast’
*******require_relative ‘…/pages/home’ *******
require_relative '…/pages/inner_screen’

class AppiumWorld

caps = Appium.load_appium_txt file: File.expand_path(’./’, FILE), verbose: true
Appium.promote_appium_methods AppiumWorld
Appium.promote_singleton_appium_methods Pages*

World do

Before { $driver.start_driver }
After { $driver.driver_quit }

The bootcamp source examples are in this repo

There are cucumber examples:

Thanks bootstraponline. The cucumber_ios and ruby_ios tutorials on github were quite useful. Thanks again!

Thanks again bootstraponline. making progress. the tutorials help!