Last active
August 29, 2015 14:03
-
-
Save jmieleiii/a6ba1bd0e3e28f6171ec to your computer and use it in GitHub Desktop.
Small example of Appium automation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this file found in lib/ | |
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
def instantiate_page_objects(driver) | |
@AndroidLandingPage = AndroidLandingPage.new(driver) | |
@AndroidLoginPage = AndroidLoginPage.new(driver) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "bundler/setup" | |
require "rspec" | |
require "appium_lib" | |
require File.expand_path(File.dirname(__FILE__) + "/shared_functions.rb") | |
Dir[File.expand_path(File.dirname(__FILE__) + "/lib/*.rb")].each { |file| require file } # class files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "spec_one" do | |
before(:all) do | |
startup | |
end | |
after(:all) do | |
teardown | |
end | |
context "context" do | |
it "should swipe" | |
do_swipe # succeeds | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "spec_one" do | |
before(:all) do | |
startup | |
end | |
after(:all) do | |
teardown | |
end | |
context "context" do | |
it "should swipe" | |
do_swipe # fails with NoMethodError | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment