Skip to content

Instantly share code, notes, and snippets.

@whitneyimura
whitneyimura / gist:9009296
Created February 14, 2014 21:07
output_help.txt
Entire Output:
02-14 21:00:12.298 2416-3440/? D/SSRMv2:Monitor﹕ SIOP:: AP = 360 (read only)
02-14 21:00:12.468 2827-2827/? D/STATUSBAR-NetworkController﹕ refreshSignalCluster: data=-1 bt=false
02-14 21:00:12.488 2827-2827/? D/STATUSBAR-IconMerger﹕ checkOverflow(384), More:false, Req:false Child:2
02-14 21:00:13.478 2827-2827/? D/STATUSBAR-NetworkController﹕ refreshSignalCluster: data=-1 bt=false
02-14 21:00:13.493 2827-2827/? D/STATUSBAR-IconMerger﹕ checkOverflow(384), More:false, Req:false Child:2
02-14 21:00:14.803 2416-3440/? D/SSRMv2:Monitor﹕ SIOP:: AP = 360, Prev AP = 360, Duration = 10017
02-14 21:00:17.308 2416-3440/? D/SSRMv2:Monitor﹕ SIOP:: AP = 360 (read only)
02-14 21:00:17.348 2827-2827/? D/STATUSBAR-NetworkController﹕ onSignalStrengthsChanged signalStrength=SignalStrength: 8 -1 -1 -1 -1 -1 -1 99 2147483647 2147483647 2147483647 -1 2147483647 gsm|lte 0x3 level=3
@whitneyimura
whitneyimura / BasePage.rb
Created January 29, 2014 17:28
Flexible Method
class BasePage.rb
def initialize
@browser = test_env[:browser]
@home = test_env[:url]
end
def verify_el(css)
@browser.find_element(:css, css)
end
@whitneyimura
whitneyimura / flexible.feature
Created January 29, 2014 17:24
Flexible feature
Feature: Flexible feature
Background:
Given I am on the home page as a logged out user
Scenario: home page layout as a logged out user
And I see the "#someId" on the home page
And I click ".some-class" on the home page
// and so on
@whitneyimura
whitneyimura / flexible_step_def.rb
Last active August 29, 2015 13:55
Flexible step definitions
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'pages', 'BasePage')
And /^I click "([^"]*)" on the home page$/ do |selector|
@page = BasePage.new(@test_env)
@page.click_el(selector)
end
And /^I see the "([^"]*)" on the home page$/ do |selector|
@page = BasePage.new(@test_env)
@page.verify_el(selector)
@whitneyimura
whitneyimura / Registration.feature
Created October 15, 2013 02:27
Create new user feature sample
Feature: Create new user
Scenario: Successfully create a new user with facebook
Given I am on the homepage
And I click the Sign Up button
And I click sign up with facebook
And I have authorized the facebook api
When I see my name in the user navigation
Then I have successfully created a new user with facebook
@whitneyimura
whitneyimura / Login.feature
Created October 15, 2013 02:25
Sample Feature file
Feature: Login Screen
Background:
Given I am on the home page
@delete_cookies
Scenario Outline:
Given I click login
And I enter
And password as
@whitneyimura
whitneyimura / login_steps.rb
Created October 15, 2013 02:25
Sample Step definitions for login
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'pages', 'HomePage')
And /^I click login$/ do
@page.header.click_login
end
And /^I enter ([A-za-z0-9.@]+)$/ do |email|
@email = email
end
@whitneyimura
whitneyimura / env.rb
Created October 14, 2013 22:14
Web env.rb file
require 'selenium-webdriver'
require 'capybara'
require 'rspec'
require 'launchy'
require 'active_support'
require 'active_support/inflector'
require 'headless'
require 'ruby-debug'
require 'webdriver-user-agent'
@whitneyimura
whitneyimura / env.rb
Last active December 25, 2015 13:19
Sample Env.rb file for Appium Android
require 'rubygems'
require 'appium_lib'
# Start Android driver
apk = {
device: :android,
app_path: (true && ENV['apk']) || (ENV['PWD'] + '/../App/build/apk/foo.apk'),
app_package: (true && ENV['package']) || 'com.google.foo',
app_activity: (true && ENV['activity']) || '.fooActivity',
app_wait_activity: (true && ENV['activity']) || 'foo.BarActivity',