Skip to content

Instantly share code, notes, and snippets.

@TuHuynhVan
TuHuynhVan / webdriverio.appium.native.swipe.js
Created July 4, 2018 07:03 — forked from wswebcreation/webdriverio.appium.native.swipe.js
This gist holds some methods I use to do swiping on iOS and Android
/**
* Here you'll find some swipe methods for a native iOS or Android app
* which can be used when you are using webdriver.io
*
* I work a lot based on percentages, so it is working on all screens and all devices
* and I hope you understand how to use it based on the docs.
*
* Feel free to use it for all kinds of purposes, a star is much appreciated ;-)
*
* Grtz,
@TuHuynhVan
TuHuynhVan / start.android.emulator.js
Created July 4, 2018 07:42 — forked from wswebcreation/start.android.emulator.js
Start your Android emulator from the command line with a simple questions form
/**
* With this helper you can start emulators from the command line with some easy questions.
* It will automatically list all AVD's that you've configuered on your machine.
*
* NOTE 1: MAKE SURE YOU'VE ADDED inquirer WITH `npm install inquirer --D` TO YOUR DEV DEPENDENCIES
* NOTE 2: MAKE SURE YOU'VE SETUP UP YOUR ENVIRONMENT CORRECTLY WITH ALL THE ENVIRONMENT VARIABLES NEEDED
* FOR MAKING ANDROID WORK ON YOUR MACHINE
* NOTE 3: MAKE SURE YOU'VE SET THE `ANDROID_EMULATOR_PATH` TO THE CORRECT PATH ON YOUR MACHINE
* WHERE ALL THE EMULATORS ARE LISTED
*
var libxmljs = require("libxmljs");
var xml = [
'<?xml version="1.0" encoding="utf-8"?>',
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">',
' <soap:Body>',
' <Response xmlns="http://tempuri.org/">',
' <Result>',
' <client xmlns="">',
' <msg>SEARCH OK.</msg>',
' <code>0</code>',