Skip to content

Instantly share code, notes, and snippets.

View jayczech23's full-sized avatar
🐙

Jordan Cech jayczech23

🐙
View GitHub Profile
@jayczech23
jayczech23 / run_linter.py
Last active May 4, 2020 15:52
Run python Linter with a minimum passing score
"""
Wrapper for Pylint to
specify a minimum Pylint
score required to pass
'static_analysis' job.
"""
import sys
from pylint import lint
THRESHOLD = 8
@jayczech23
jayczech23 / appium-python-setup.sh
Created February 17, 2020 16:57
Shell script to download python3 and create venv w/ Appium dependencies (USING HOMEBREW)
green=`tput setaf 2`
function activate() {
source ~/.venvs/appium_env/bin/activate
}
function install_appium_python() {
echo "${green} Checking if Python 3 installed"
if command -v python3 &>/dev/null; then
echo Python 3 is installed
@jayczech23
jayczech23 / pip_check.sh
Created October 17, 2019 23:37
Python: Check if pip module has been installed
python -c "import <package_name_here>
// If no output result, the package is installed.
@jayczech23
jayczech23 / gist:e10a05ad6e05499e2d55b23602a11efc
Created July 18, 2018 16:24
[element.sendKeys("000")] Error response status: 13, UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: An unknown server-side error occurred while processing the command.
[HTTP] <-- POST /wd/hub/session/7fdcc6ea-4a41-411e-82b2-b1cc63ab9efa/elements 200 61 ms - 124
[HTTP]
[HTTP] --> POST /wd/hub/session/7fdcc6ea-4a41-411e-82b2-b1cc63ab9efa/element/15000000-0000-0000-107F-000000000000/value
[HTTP] {"value":["11"]}
[MJSONWP] Calling AppiumDriver.setValue() with args: [["11"],"15000000-0000-0000-107F-000000000000","7fdcc6ea-4a41-411e-82b2-b1cc63ab9efa"]
[XCUITest] Executing command 'setValue'
[JSONWP Proxy] Proxying [POST /element/15000000-0000-0000-107F-000000000000/value] to [POST http://localhost:8100/session/48FD47E1-000E-4FC2-BE2A-589F84EA6552/element/15000000-0000-0000-107F-000000000000/value] with body: {"value":["1","1"]}
[JSONWP Proxy] Got response with status 200: {"value":"Error Domain=com.facebook.WebDriverAgent Code=1 \"Keyboard is not present\" UserInfo={NSLocalizedDescription=Keyboard is not present}","sessionId":"48FD47E1-000E-4FC2-BE2A-589F84EA6552","status":13}
[JSONWP Proxy] Proxying [GET /element/15000000-0000-0000-107F-000000000000/attribute/type] to [GET htt
@jayczech23
jayczech23 / gist:1c2182af1529f99190677e0243172e4e
Created February 7, 2017 23:39
Appium Log (1838, 07FEB2017) (after xcpretty and ios-deploy install)
[debug] [XCUITest] App installed successfully.
[XCUITest] Using WDA path: '/Users/ueff/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[XCUITest] Using WDA agent: '/Users/ueff/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj'
[XCUITest] Launching WebDriverAgent on the device
[debug] [XCUITest] Carthage found: /usr/local/bin/carthage
[debug] [XCUITest] Killing hanging processes
[debug] [XCUITest] iproxy exited with code 'null'
[debug] [XCUITest] Using Xcode configuration file: '/Users/ueff/Desktop/iosConfig.xcconfig'
[debug] [XCUITest] Beginning test with command 'xcodebuild build-for-testing test-without-building -project /Users/ueff/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=889f82039dce7c9d45173dd8547b08363e74dcd2 -configuration Debug -xcconfig /Users/ueff/Desktop/iosConfig.xcconfig' in directory '/Users/ueff/appium/node_modules/appium-xcuitest-driver/WebDriverAgent'
[debug] [XCU
@jayczech23
jayczech23 / gist:10a8019f3e163d837ff87418eae201c8
Created February 7, 2017 20:35
xcodebuild(07FEB2017,1535)
UEFFs-MacBook-Pro:WebDriverAgent ueff$ xcodebuild build-for-testing test-without-building -project /Users/ueff/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id=889f82039dce7c9d45173dd8547b08363e74dcd2 -configuration Debug -xcconfig /Users/ueff/Desktop/iosConfig.xcconfig
Build settings from configuration file '/Users/ueff/Desktop/iosConfig.xcconfig':
CODE_SIGN_IDENTITY = iPhone Developer
DEVELOPMENT_TEAM = V78S87P3ZH
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ id:889f82039dce7c9d45173dd8547b08363e74dcd2 }
Unsupported device specifier option.
The device “My Mac” does not support the following options: id
UEFFs-MacBook-Pro:ActivePythonTests ueff$ cd /Users/ueff/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/
UEFFs-MacBook-Pro:WebDriverAgent ueff$ xcodebuild build-for-testing test-without-building -project /Users/ueff/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgent.xcodeproj/ -scheme WebDriverAgentRunner -destination id=889f82039dce7c9d45173dd8547b08363e74dcd2 -configuration Debug -xcconfig /Users/ueff/Desktop/iosConfig.xcconfig
Build settings from configuration file '/Users/ueff/Desktop/iosConfig.xcconfig':
CODE_SIGN_IDENTITY = iPhone Developer
DEVELOPMENT_TEAM = V78S87P3ZH
=== BUILD TARGET WebDriverAgentLib OF PROJECT WebDriverAgent WITH CONFIGURATION Debug ===
Check dependencies
@jayczech23
jayczech23 / gist:7b01e4c430f4d670dae74fd5c1767869
Created February 7, 2017 19:45
Appium Log (1445,07FEB2017)
[debug] [XCUITest] Waiting up to 60000ms for WebDriverAgent to start
[debug] [XCUITest] Log file for xcodebuild test: /Users/ueff/Library/Developer/Xcode/DerivedData/WebDriverAgent-gqjvlaqaqtgrzrfbjevmbvrvtqqq/Logs/Test/7AD1A479-63E6-461E-9CD3-305202D800F5/Session-WebDriverAgentRunner-2017-02-07_143812-70ghnu.log
[Xcode] 2017-02-07 14:38:12.089 xcodebuild[14818:83447] Error Domain=NSCocoaErrorDomain Code=260 "The file “WebDriverAgentRunner-Runner.app” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/ueff/Library/Developer/Xcode/DerivedData/WebDriverAgent-gqjvlaqaqtgrzrfbjevmbvrvtqqq/Build/Products/Debug-iphoneos/WebDriverAgentRunner-Runner.app, NSUnderlyingError=0x7f8eeefe18a0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
[Xcode] 2017-02-07 14:38:12.089 xcodebuild[14818:83447] Error Domain=IDETestOperationsObserverErrorDomain Code=5 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescript
UEFFs-MacBook-Pro:ActivePythonTests ueff$ python FMInitInstallDEVICE.py
Traceback (most recent call last):
File "FMInitInstallDEVICE.py", line 26, in <module>
wd = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 92, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 179, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/Library/Python/2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
@jayczech23
jayczech23 / AppiumLog.txt
Last active February 6, 2017 20:41
Appium Logs when trying to run test
[HTTP] --> POST /wd/hub/session {"requiredCapabilities":{},"desiredCapabilities":{"deviceName":"iPhone 6","udid":"889f82039dce7c9d45173dd8547b08363e74dcd2","app":"/Users/ueff/Desktop/iOSBuilds/iPhone6FMBuild.ipa","noReset":true,"appium-version":"1.0","platformVersion":"10.2","platformName":"iOS","automationName":"XCUITest","bundleId":"com.att.fleetmode.ios"}}
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"deviceName":"iPhone 6","udid":"889f82039dce7c9d45173dd8547b08363e74dcd2","app":"/Users/ueff/Desktop/iOSBuilds/iPhone6FMBuild.ipa","noReset":true,"appium-version":"1.0","platformVersion":"10.2","platformName":"iOS","automationName":"XCUITest","bundleId":"com.att.fleetmode.ios"},{},null,null,null]
[Appium] Creating new XCUITestDriver session
[Appium] Capabilities:
[Appium] deviceName: 'iPhone 6'
[Appium] udid: '889f82039dce7c9d45173dd8547b08363e74dcd2'
[Appium] app: '/Users/ueff/Desktop/iOSBuilds/iPhone6FMBuild.ipa'
[Appium] noReset: true
[Appium] appium-version: '1.0'
[Appium]