Skip to content

Instantly share code, notes, and snippets.

View Torreslol's full-sized avatar

Torres Torreslol

  • Wuxi
View GitHub Profile
@Torreslol
Torreslol / appium--doctor
Created July 1, 2019 07:18
appium--doctor
info AppiumDoctor Appium Doctor v.1.10.0
info AppiumDoctor ### Diagnostic for necessary dependencies starting ###
info AppiumDoctor ✔ The Node.js binary was found at: /usr/local/bin/node
info AppiumDoctor ✔ Node version is 10.16.0
info AppiumDoctor ✔ Xcode is installed at: /Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ Xcode Command Line Tools are installed in: /Applications/Xcode.app/Contents/Developer
info AppiumDoctor ✔ DevToolsSecurity is enabled.
info AppiumDoctor ✔ The Authorization DB is set up properly.
info AppiumDoctor ✔ Carthage was found at: /usr/local/bin/carthage
info AppiumDoctor ✔ HOME is set to: /Users/0003400
@Torreslol
Torreslol / simpleAppiumTest.py
Last active July 1, 2019 05:54
appium sample code (python)
# This sample code uses the Appium python client
# pip install Appium-Python-Client
# Then you can paste this into a file and simply run with Python
from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
def test_should_create_and_destroy_ios_web_session():
caps = {}
[info] [Appium] Welcome to Appium v1.13.0
[info] [Appium] Appium REST http interface listener started on 0.0.0.0:4723[info] [HTTP] --> POST /wd/hub/session
[info] [HTTP] {"capabilities":{"firstMatch":[{"appium:automationName":"xcuitest","platformName":"iOS","appium:platformVersion":"12.2","appium:deviceName":"“食行”的 iPhone","appium:udid":"5b900c43598a7213b42e50ed8209cec9c0fc5443","appium:app":"/Users/0003400/Desktop/1/sxsx.ipa","appium:autoAcceptAlerts":true,"appium:wdaLaunchTimeout":240000,"appium:wdaConnectionTimeout":240000,"appium:clearSystemFiles":true,"appium:simpleIsVisibleCheck":true}]},"desiredCapabilities":{"automationName":"xcuitest","platformName":"iOS","platformVersion":"12.2","deviceName":"“食行”的 iPhone","udid":"5b900c43598a7213b42e50ed8209cec9c0fc5443","app":"/Users/0003400/Desktop/1/sxsx.ipa","autoAcceptAlerts":true,"wdaLaunchTimeout":240000,"wdaConnectionTimeout":240000,"clearSystemFiles":true,"simpleIsVisibleCheck":true
@Torreslol
Torreslol / ASBidirectionFetchExample.swift
Created January 18, 2019 07:52 — forked from GeekTree0101/ASBidirectionFetchExample.swift
ASBatchFetching Customize for Bidirectional Fetching
import Foundation
import AsyncDisplayKit
public protocol ChatNodeDelegate: ASCollectionDelegate {
func shouldAppendBatchFetch(for chatNode: ASCollectionNode) -> Bool
func shouldPrependBatchFetch(for chatNode: ASCollectionNode) -> Bool
func chatNode(_ chatNode: ASCollectionNode,
willBeginAppendBatchFetchWith context: ASBatchContext)