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 / onliners.response.json
Last active December 9, 2017 18:50
This JSON is part of the demo app of wswebcreation and is used in the Chat view. These oneliners are used as responses in the chat
[
"May the force be with you.",
"Bond. James bond.",
"I’ll be back",
"Houston, we have a problem.",
"You talking to me?",
"Here’s Johnny!",
"Go ahead, make my day.",
"Say hello to my little friend!",
"Yippee-ki-yay, Motherf*cker!",
@wswebcreation
wswebcreation / conversation.json
Last active January 21, 2018 08:37
This JSON is part of the demo app of wswebcreation and is used in the Chat view. This is the default conversation
[
{
"placeRight": true,
"message": "I'm fine, how are you?"
},
{
"placeRight": false,
"message": "Hey wassup?"
}
]
@wswebcreation
wswebcreation / chat.history.json
Last active January 21, 2018 08:37
This JSON is part of the demo app of wswebcreation and is used in the Chat view. This is the chat history
[
{
"firstName": "Dick",
"lastName": "Tracy",
"conversation": [
{
"placeRight": true,
"message": "So it seems like this internet thing is here to stay, huh?"
},
{
@wswebcreation
wswebcreation / after.scenario.js
Created May 18, 2018 12:09
Setup for attaching the difference to the Cucumber report file. This can be used with Protractor + CucumberJS + protractor-image-comparison
import { After, Status } from 'cucumber';
import { resolve } from 'path';
const fs = require('fs');
const diffFolder = resolve(process.cwd(), '.tmp/report/screenshots/image-comparison/diff/');
const screenshotFolder = resolve(process.cwd(), '.tmp/screenshots/');
/**
* The After hook that checks the scenario status and creates a
* screemshot if needed
@wswebcreation
wswebcreation / find.element.js
Last active June 3, 2018 15:03
Find an element that can't be find in the UI-tree with Appium + webdriver.io by using an other component
let SEND_BUTTON_COORDINATES;
const SELECTORS = {
INPUT: '~test-Message input',
ADD_BUTTON: '~test-Add',
SEND_BUTTON: '~test-Send',
};
export class ChatInput {
/**
* Get the chat input
@wswebcreation
wswebcreation / 1.issue.md
Created July 12, 2018 05:16
`An unknown server-side error occurred while processing the command` while sending text to an iOS simulator

Issue:

Typing text into an input text element on an iOS simulator with webdriver.io and Appium is causing an error like this

An unknown server-side error occurred while processing the command. Original error: An unknown server-side error occurred while processing the command.

The result is a failing test.

The command

The command is very simple, just this $('~test-Stel hier je vraag.').setValue('Ben je er?')

@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
*/
/**
* 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', () => {
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
[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"