Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><title>Sauce Labs: Cross Browser Testing, Selenium Testing &amp; Mobile Testing</title><meta property="og:title" content="Sauce Labs: Cross Browser Testing, Selenium Testing &amp; Mobile Testing"><meta name="description" content="The world's largest continuous testing cloud of web and mobile applications. Access web browsers, mobile emulators, simulators, and real mobile devices."><meta property="og:description" content="The world's largest continuous testing cloud of web and mobile applications. Access web browsers, mobile emulators, simulators, and real mobile devices."><link rel="preload" as="image" imagesrcset="/_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fvrc8wif0t20g%2F2HX4HAZ0lFaJ2ZK9eabUoT%2Feda1664bd0956d02cd0a7474f24b5b01%2FScreenshot_2023-01-23_at_18.06.16.png&amp;w=640&amp;q=75 640w, /_next/image?url=https%3A%2F%2Fimages.ctfassets.net%2Fvrc8wif0t20g%2F2HX4HAZ0lFaJ2ZK9eabUoT%2Feda1664bd0956d02cd0a
@aluedeke
aluedeke / README.MD
Last active August 29, 2022 09:58
hot plug usb devices to qemu (lima,colima) vms using qmp/hmp

Install qmp-shell

pip3 install qmp.qmp

This should have added the qemu-shell command to your shell.

You need to connect then to the qemu qmp socket. If you are starting the qemu vm yourself add this to your qemu launch command:
-chardev socket,id=char-qmp,path=PATH_TO_YOUR_QMP_SOCKET,server=on,wait=off -qmp chardev:char-qmp

If you are using lima/colima or other tools do:

import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.Augmenter;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
@aluedeke
aluedeke / my test script
Created February 10, 2014 15:24
import Imports
import(0)
import(Util())
aReusableTestFuntion();
@aluedeke
aluedeke / build.gradle
Created January 23, 2014 10:21
testobject gradle web app
buildscript {
repositories {
mavenCentral()
maven { url 'http://nexus.testobject.org/nexus/content/repositories/testobject-public-beta-repo' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4+'
classpath group: 'org.testobject.extras', name: 'gradle', version: '3+'
}
@aluedeke
aluedeke / sample.js
Created January 7, 2014 15:10
functions
function test(){
click(...)
waitLoaded()
}
test();
@aluedeke
aluedeke / commands
Created January 6, 2014 20:08
docker basic auth
build)
packer build -var 'build_target=$BUILD_TARGET' packer.json
;;
import)
docker import - $DOCKER_REGISTRY_HOST:5000/$DOCKER_REPOSITORY < $BUILD_TARGET
;;
run)
docker run -i -t -p $DOCKER_REGISTRY_PORT:443 -p 5050:5000 -e SETTINGS_FLAVOR=prod -e AWS_KEY=$AWS_KEY -e AWS_SECRET=$AWS_SECRET -e AWS_BUCKET=$AWS_BUCKET $DOCKER_REGISTRY_HOST:5000/$DOCKER_REPOSITORY:latest supervisord -n
@aluedeke
aluedeke / gist:7977839
Last active January 10, 2017 19:39
docker without sudo
# Add the docker group if it doesn't already exist.
sudo groupadd docker
# Add the connected user "${USERNAME}" to the docker group.
# Change the user name to match your preferred user.
# You may have to logout and log back in again for
# this to take effect.
sudo gpasswd -a ${USERNAME} docker
# Restart the docker daemon.
@aluedeke
aluedeke / custom chance.js
Created October 22, 2013 12:47
Using randomly generated emails
// Chance.js 0.4.3
// http://chancejs.com
// (c) 2013 Victor Quinn
// Chance may be freely distributed or modified under the MIT license.
var window = {};
(function () {
// Constructor
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
...
var modRewrite = require('connect-modrewrite');