Skip to content

Instantly share code, notes, and snippets.

View prolificcoder's full-sized avatar

Satyajit Malugu prolificcoder

  • SoFi
  • Raleigh
View GitHub Profile
@prolificcoder
prolificcoder / appium log
Created April 15, 2013 21:25
Whole stack trace
info: [ADB] Waiting for device emulator-5554 to be ready and to respond to shell commands (timeout = 5)
debug: Getting install/clean status for com.urbanspoon
info: [ADB] Forwarding system:4724 to device:4724
info: [ADB] Pushing appium bootstrap to device...
info: [ADB] Starting app com.urbanspoon/com.urbanspoon.activities.DashboardActivity
info: [ADB] Attempting to unlock screen
info: Waiting for app's activity to become focused
info: [ADB STDOUT] INSTRUMENTATION_STATUS: current=1
info: [ADB STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [ADB STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
@prolificcoder
prolificcoder / gist:5757019
Created June 11, 2013 13:51
Appium log for iOS 7 sample app
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"sessionId":null,"desiredCapabilities":{"name":"Appium Android Test","app":"/Users/malugus/code/appium/appium-workshop/python/ios/../../apps/CollectionViewTransition.app.zip","platform":"Mac 10.8","version":"6.1","newCommandTimeout":60,"device":"iPhone Simulator"}}
info: Using local zip from desiredCaps: /Users/malugus/code/appium/appium-workshop/python/ios/../../apps/CollectionViewTransition.app.zip
info: Copying local zip to tmp dir
info: /Users/malugus/code/appium/appium-workshop/python/ios/../../apps/CollectionViewTransition.app.zip copied to /var/folders/51/rklg31md11q937m11mv1hykm0000gn/T/appium-app113511-17453-15uqhqj.zip
info: Unzipping /var/folders/51/rklg31md11q937m11mv1hykm0000gn/T/appium-app113511-17453-15uqhqj.zip
info: Testing zip archive: /var/folders/51/rklg31md11q937m11mv1hykm0000gn/T/appium-app113511-17453-15uqhqj.zip
info: Zip archive tested clean
info: Unzip successful
info: Using locally extracted app
@prolificcoder
prolificcoder / menu_view.rb
Last active December 18, 2015 14:09
Dynamic method names for cells in iOS. Refactoring welcome. With this code one could call menu_view.signin menu_view.login etc.. without actually defining the methods
class MenuView
# Process the cell names 1)convert to lowercase 2)remove spaces
# create a hash of cell names and cells, call super if correct cell
# isn't given other return the cell
# Notice that global $driver should be called explicitly
def method_missing(name, *args)
name = name.to_s
cells = $driver.find_eles_attr 'UIATableCell', 'name'
cell_names_downcase = cells.map { |cell| cell.downcase }
cell_names_strip = cell_names_downcase.map { |cell| cell.gsub(/\s/,'') }
@prolificcoder
prolificcoder / attributes.js
Created July 12, 2013 04:57
attempt to add a test for selected
/*global it:true */
"use strict";
var path = require('path')
, appPath = path.resolve(__dirname, "../../../sample-code/apps/ApiDemos/bin/ApiDemos-debug.apk")
, appPkg = "com.example.android.apis"
, appAct = ".ApiDemos"
, describeWd = require("../../helpers/driverblock.js").describeForApp(appPath,
"android", appPkg, appAct)
, should = require('should');
{ "name" : "Mike" }
@prolificcoder
prolificcoder / gist:6612161
Created September 18, 2013 16:59
Page object models for iOS and Android
class AndroidWorld
module RestaurantsListScreen
class << self
def restaurant(restaurant_name)
#scroll to restaurant unless its already in view
scroll_to restaurant_name unless exists {s_text restaurant_name }
s_text restaurant_name
end
@prolificcoder
prolificcoder / gist:6816185
Created October 3, 2013 20:00
crashlytics causing adt to crash
Process: eclipse [2604]
Path: /Applications/eclipse/Eclipse.app/Contents/MacOS/eclipse
Identifier: org.eclipse.eclipse
Version: 3.8 (3.8)
Code Type: X86-64 (Native)
Parent Process: launchd [248]
User ID: 501
Date/Time: 2013-10-03 12:55:44.942 -0700
OS Version: Mac OS X 10.8.5 (12F37)
[~/code/appium]$ node bin/appium.js *[master][1.9.3-p125]
info: Welcome to Appium v0.10.4 (REV fa1f063018c5c173eddfbf8fbdb7c58d860c4db2)
info: Appium REST http interface listener started on 0.0.0.0:4723
info - socket.io started
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"browserName":"iOS","device":"iPhone Simulator","platform":"Mac","version":"7.0","app":"/Users/malugus/code/appium/sample-code/apps/TestApp/build/Release-iphonesimulator/TestApp.app","javascriptEnabled":true}}
info: Using local app from desiredCaps: /Users/malugus/code/appium/sample-code/apps/TestApp/build/Release-iphonesimulator/TestApp.app
info: Creating new appium session 02df75d2-14c7-4b80-a0f6-f27ea7ec79a8
info: Removing any remaining instruments sockets
info: Cleaned up instruments socket /tmp/instruments_sock
<?xml version='1.0' encoding='UTF-8' standalone='yes'?><hierarchy rotation="0"><android.widget.FrameLayout index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.godaddy.mobile.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][768,1184]"><android.view.View index="0" text="" resource-id="" class="android.view.View" package="com.godaddy.mobile.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,50][768,1184]"><android.view.View index="0" text="" resource-id="android:id/action_bar" class="android.view.View" package="com.godaddy.mobile.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollab
<?xml version='1.0' encoding='UTF-8' standalone='yes'?><hierarchy rotation="0"><android.widget.FrameLayout index="0" text="" resource-id="" class="android.widget.FrameLayout" package="com.godaddy.mobile.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,0][768,1184]"><android.view.View index="0" text="" resource-id="" class="android.view.View" package="com.godaddy.mobile.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="true" focused="false" scrollable="false" long-clickable="false" password="false" selected="false" bounds="[0,50][768,1184]"><android.view.View index="0" text="" resource-id="android:id/action_bar" class="android.view.View" package="com.godaddy.mobile.android" content-desc="" checkable="false" checked="false" clickable="false" enabled="true" focusable="false" focused="false" scrollab