Skip to content

Instantly share code, notes, and snippets.

View christian-bromann's full-sized avatar
🕵️‍♂️
Testing All The Things™

Christian Bromann christian-bromann

🕵️‍♂️
Testing All The Things™
View GitHub Profile
@christian-bromann
christian-bromann / Manifest.json
Created September 3, 2012 20:48
[Chrome Extension] Remove all cookie data
{
"manifest_version": 2,
"name": "MyExtension",
"version": "0.1",
"description": "My awesome chrome extension!",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "index.html"
},
"background": {
@christian-bromann
christian-bromann / gist:5372928
Created April 12, 2013 15:35
activate keyboard bindings after page load on Google Maps APIv2
new GKeyboardHandler(map);
var mapContainer = document.getElementById("map_canvas");
GEvent.trigger(document, "click", {srcElement: mapContainer, target: mapContainer, nodeType: 1});
@christian-bromann
christian-bromann / streetview.js
Last active December 16, 2015 06:39
enable keyboard accessibility of Google Maps in StreetView mode (APIv3) after page load
/**
* Google StreetView provides keyboard accessibility to navigate with the arrow keys.
* Unfortunately you have to click on the map manually beforehand to activate this.
* This script enables that automatically.
*
* @requires Google Maps API v3
*/
/**
@christian-bromann
christian-bromann / webdriver.js
Last active December 21, 2015 19:59
Use Webdriverjs with Browserstack (example)
var webdriverjs = require('../index'),
client = webdriverjs.remote({
host: 'hub.browserstack.com',
port: 80,
logLevel: 'silent',
desiredCapabilities: {
'browser': 'IE',
'browser_version': '7.0',
'os': 'Windows',
'os_version': 'XP',
@christian-bromann
christian-bromann / webdriver.js
Last active December 30, 2015 21:10
Use Webdriverjs with Sauce Labs (example)
var webdriverjs = require('../index'),
client = webdriverjs.remote({
desiredCapabilities: {
browserName: 'chrome',
version: '27',
platform: 'XP',
tags: ['examples'],
name: 'This is an example test'
},
host: 'ondemand.saucelabs.com',
@christian-bromann
christian-bromann / webdriverjs.with.buster.js
Created September 2, 2013 20:12
run WebdriverJS with Buster.JS
var buster = require("buster"),
webdriverjs = require('webdriverjs');
buster.testCase("my webdriverjs tests", {
'setUp': function() {
this.timeout = 9999999;
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} });
client.init();
@christian-bromann
christian-bromann / webdriverjs.with.jasmine.spec.js
Created September 2, 2013 20:13
run WebdriverJS with Jasmine
var webdriverjs = require('webdriverjs');
describe('my webdriverjs tests', function() {
var client = {};
jasmine.DEFAULT_TIMEOUT_INTERVAL = 9999999;
beforeEach(function() {
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} });
client.init();
@christian-bromann
christian-bromann / webdriverjs.with.mocha.and.chai.js
Created September 2, 2013 20:15
run WebdriverJS with Mocha and Chai
var chai = require('chai'),
assert = chai.assert,
expect = chai.expect,
webdriverjs = require('webdriverjs');
describe('my webdriverjs tests', function(){
this.timeout(99999999);
var client = {};
@christian-bromann
christian-bromann / webdriverjs.with.mocha.js
Created September 2, 2013 20:15
run WebdriverJS with Mocha
var webdriverjs = require('webdriverjs'),
assert = require('assert');
describe('my webdriverjs tests', function(){
this.timeout(99999999);
var client = {};
before(function(){
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} });
@christian-bromann
christian-bromann / webdriverjs.with.nodeunit.js
Created September 2, 2013 20:16
run WebdriverJS with NodeUnit
var webdriverjs = require('webdriverjs'),
assert = require('assert');
module.exports = {
setUp: function (callback) {
client = webdriverjs.remote({ desiredCapabilities: {browserName: 'phantomjs'} });
client.init();
callback();