Skip to content

Instantly share code, notes, and snippets.

View wswebcreation's full-sized avatar
🤣
SaaS (Selles as a Service)

Wim Selles wswebcreation

🤣
SaaS (Selles as a Service)
View GitHub Profile
@wswebcreation
wswebcreation / appium.1.18.3.log
Last active November 15, 2020 14:10
Appium Android Hybrid App not getting active webview
[Appium] Welcome to Appium v1.18.3
[Appium] Non-default server args:
[Appium] basePath: /
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /session
[HTTP] {"capabilities":{"alwaysMatch":{"automationName":"UiAutomator2","deviceName":"Pixel_3_10.0","platformName":"Android","platformVersion":"10.0","orientation":"PORTRAIT","app":"/Users/wimselles/Sauce/Git/SauceLabsHybridApp/apps/Android.SauceLabs.Hybrid.app.1.0.0.apk","appWaitActivity":"com.saucelabshybridapp.MainActivity","noReset":true,"autoGrantPermissions":true,"newCommandTimeout":240,"language":"en","locale":"en"},"firstMatch":[{}]},"desiredCapabilities":{"automationName":"UiAutomator2","deviceName":"Pixel_3_10.0","platformName":"Android","platformVersion":"10.0","orientation":"PORTRAIT","app":"/Users/wimselles/Sauce/Git/SauceLabsHybridApp/apps/Android.SauceLabs.Hybrid.app.1.0.0.apk","appWaitActivity":"com.saucelabshybridapp.MainActivity","noReset":true,"autoGrantPermissions":true,"newCommandTimeout":240,"language":"en
@wswebcreation
wswebcreation / draw.sauce.bolt.js
Last active March 27, 2020 20:28
The Test to draw the Sauce Labs Bolt with Appium, WebdriverIO and the W3C actions
// You can download the app from here
// http://appium.s3.amazonaws.com/ApiDemos-debug-2015-03-19.apk
//
// If you want to use the app, make sure you add this into your capabilities
// appActivity: '.graphics.FingerPaint',
// This will make sure that the FingerPaint screen is opened at once!
//
// Thanks to Jonathan Lipps for this Article
// https://appiumpro.com/editions/29
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"platformName":"iOS","appium:deviceName":"iPhone X","appium:platformVersion":"12.2","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:app":"/Users/wimselles/Git/wdio-native-demo-app/ios/build/wdioDemoApp/Build/Products/Debug-iphonesimulator/wdioDemoApp.app","appium:newCommandTimeout":240},"firstMatch":[{}]},"desiredCapabilities":{"platformName":"iOS","appium:deviceName":"iPhone X","appium:platformVersion":"12.2","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:app":"/Users/wimselles/Git/wdio-native-demo-app/ios/build/wdioDemoApp/Build/Products/Debug-iphonesimulator/wdioDemoApp.app","appium:newCommandTimeout":240}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"platformName":"iOS","appium:deviceName":"iPhone X","appium:platformVersion":"12.2","appium:orientation":"PORTRAIT","appium:automationName":"XCUITest","appium:app":"/Users/wimselles/Git/wdio-native-demo-app/ios/build
[debug] [W3C (0bedd823)] Responding to client with driver.createSession() result: {"capabilities":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"networkConnectionEnabled":false,"platformName":"iOS","deviceName":"iPhone X","platformVersion":"12.2","orientation":"PORTRAIT","automationName":"XCUITest","app":"/Users/wimselles/Sauce/Git/appium-boilerplate/apps/iOS-Simulator-NativeDemoApp-0.3.0.app.zip","newCommandTimeout":240,"udid":"EAE23CD4-7B34-42D6-BBFB-F74B1543944D"}}
[HTTP] <-- POST /wd/hub/session 200 98636 ms - 569
[HTTP]
[HTTP] --> POST /wd/hub/session/0bedd823-3af4-4e59-a0c0-f9cfc370c6d6/element
[HTTP] {"using":"accessibility id","value":"Home, tab, 1 of 5"}
[debug] [W3C (0bedd823)] Calling AppiumDriver.findElement() with args: ["accessibility id","Home, tab, 1 of 5","0bedd823-3af4-4e59-a0c0-f9cfc370c6d6"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Valid locat
[Appium] Welcome to Appium v1.14.0
[Appium] Non-default server args:
[Appium] chromedriverExecutable: ./chromedriver
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"deviceName":"iPhone X","platformName":"iOS","platformVersion":"12.2","orientation":"PORTRAIT","app":"/Users/wimselles/Sauce/Git/webdriverio-5-playground/apps/iOS.Simulator.SauceLabs.Mobile.Sample.app.2.1.0.app.zip","noReset":true,"newCommandTimeout":240,"fullContextList":true},"firstMatch":[{}]},"desiredCapabilities":{"deviceName":"iPhone X","platformName":"iOS","platformVersion":"12.2","orientation":"PORTRAIT","app":"/Users/wimselles/Sauce/Git/webdriverio-5-playground/apps/iOS.Simulator.SauceLabs.Mobile.Sample.app.2.1.0.app.zip","noReset":true,"newCommandTimeout":240,"fullContextList":true}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"deviceName":"iPhone X","platformName":"iOS","platformVersion":"12.2","orientation":"PORTRAIT","app"
This file has been truncated, but you can view the full file.
[HTTP] --> POST /wd/hub/session
[HTTP] {"capabilities":{"alwaysMatch":{"deviceName":"iPhone X","platformName":"iOS","platformVersion":"12.2","orientation":"PORTRAIT","app":"/Users/wimselles/Sauce/Git/webdriverio-5-playground/apps/iOS.Simulator.SauceLabs.Mobile.Sample.app.1.0.0.app.zip","noReset":true,"newCommandTimeout":240},"firstMatch":[{}]},"desiredCapabilities":{"deviceName":"iPhone X","platformName":"iOS","platformVersion":"12.2","orientation":"PORTRAIT","app":"/Users/wimselles/Sauce/Git/webdriverio-5-playground/apps/iOS.Simulator.SauceLabs.Mobile.Sample.app.1.0.0.app.zip","noReset":true,"newCommandTimeout":240}}
[debug] [W3C] Calling AppiumDriver.createSession() with args: [{"deviceName":"iPhone X","platformName":"iOS","platformVersion":"12.2","orientation":"PORTRAIT","app":"/Users/wimselles/Sauce/Git/webdriverio-5-playground/apps/iOS.Simulator.SauceLabs.Mobile.Sample.app.1.0.0.app.zip","noReset":true,"newCommandTimeout":240},null,{"alwaysMatch":{"deviceName":"iPhone X","platformName":"iOS","platformVer
@wswebcreation
wswebcreation / selectors.js
Last active August 10, 2022 21:51
Preferred Native Appium Selectors for WebdriverIO
// The `~` tells WebdriverIO that it needs to look for an accessibiltyID
// Android: `content description`
// iOS: `accessibility id`
$('~accessibiltyID').click();
// -ios predicate string
const loginButton = 'type == \'XCUIElementTypeOther\' && name CONTAINS \'test-LOGIN\'';
$(`-ios predicate string:${ loginButton }`).click();
// -ios class chain, to make complex selectors
/**
* This is an example class for how the handle alerts with WebdriverIO.
* You can use it in the following way (this is with Jasmine, but other frameworks can also be used)
*
* @example
* import Screen from '../Screen';
* import NativeAlert from '../NativeAlert';
*
* describe('Check buttons', () => {
* it('should be able to open the alert and close it with all 3 buttons', () => {
@wswebcreation
wswebcreation / wdio.conf.js
Created July 26, 2018 12:21
Simple setup to provide feature files through the command line, 1, multiple or all. Use this with webdriver.io
/**
* This is an example conf with webdriver.io + cucumberjs to run 1 or multiple feature through the command line.
* I use `yargs` to get command line arguments, but there is maybe a better / easier way.
*
* Feel free to use it for all kinds of purposes, a star is much appreciated ;-)
*
* Grtz,
* Wim | wswebreation
*/
@wswebcreation
wswebcreation / getNativeText.js
Created July 18, 2018 07:36
Get text from native iOS/Android elements with webdriver.io and Appium
/**
* This a method to get text from a native iOS/Android app component.
* It can be used when you are using webdriver.io
*
* In the app I need to automate I found out that:
* - iOS will have the complete text (of all the childeren) in the parent component.
* - on Android a component can have mutiple childrens, that's why you get an array of text back
*
* Feel free to use it for all kinds of purposes, a star is much appreciated ;-)
*