Skip to content

Instantly share code, notes, and snippets.

View adamgoucher's full-sized avatar

adam goucher adamgoucher

View GitHub Profile
@adamgoucher
adamgoucher / pitch.txt
Last active December 12, 2015 03:08
my sixty second ignite durham pitch
So I have been testing software professionally for over ten years and in that time the web and mobile
have dramatically changed the sorts of things that I get asked to test. It is a little ironic then that
the systems marketed at testers to do their jobs have largely gone unchanged since the mid 90s.
Testing is a creative process, but the systems available to us right now use a rote, robotic, do this,
do that, expect this result approach. And that’s not very creative at all. But those of us on the
forefront testing know a better way to do things. Mindmaps. Yes, those fun little bubble diagrams you
used back in highschool to brainstorm are ideally suited for capturing and managing test ideas.
There are a number of mindmapping applications floating around that have been co-opted by the testing
@adamgoucher
adamgoucher / MailinatorProvider.php
Created January 29, 2013 18:21
The start of a class for interacting with Mailinator. At some point I'll need to just re-write pop3_class though -- holy un-not-the-way-I-think, batman
<?php
require_once('third_party/pop3class-2009-02-01/pop3.php');
require_once('PHPWebDriver/WebDriverWait.php');
class MailinatorProvider extends pop3_class {
function __construct($email, $debug = 0) {
$this->hostname = "pop.mailinator.com";
$this->port = 110;
$this->username = strstr($email, '@', True);
$this->password = "abcdefgh";
@adamgoucher
adamgoucher / by property.py
Created January 15, 2013 18:10
ideas on how to mark browsers as being remote or not -- or more accurately whether they can use the localfiledetecter that is in send_keys. with the additional twist of being a wrapper around webdriver and not being in the project itself
class Remote(object):
IS_A_REMOTE_BROWSER = True
def send_keys(self):
if self.IS_A_REMOTE_BROWSER:
print('%s is a remote' % self.__class__.__name__)
print('send_keys')
class Firefox(Remote):
# this is in chemistry kit
module ChemistryKit
module PageObject
def initialize(driver)
@driver = browser
super
end
end
@adamgoucher
adamgoucher / conftest.py
Created December 16, 2012 15:24
conftest.py example for creating randomly ordered scripts
import random
def pytest_collection_modifyitems(items):
random.shuffle(items)
@adamgoucher
adamgoucher / one.txt
Created November 25, 2012 22:28
3 different android runs
Testsuite: org.openqa.selenium.android.AndroidDriverTests
Tests run: 51, Failures: 2, Errors: 17, Time elapsed: 46.61 sec
------------- Standard Error -----------------
Nov 25, 2012 5:09:27 PM org.openqa.selenium.testing.JUnit4TestBase$1 starting
INFO: >>> Starting testFindElementByXPath(org.openqa.selenium.ChildrenFindingTest)
Nov 25, 2012 5:09:34 PM org.seleniumhq.jetty7.server.Server doStart
INFO: jetty-7.x.y-SNAPSHOT
Nov 25, 2012 5:09:35 PM org.seleniumhq.jetty7.server.handler.ContextHandler startContext
INFO: started o.s.j.w.WebAppContext{/common,file:/Users/adam/selenium/selenium-2.26.0/common/src/web/},/Users/adam/selenium/selenium-2.26.0/./common/src/web
Nov 25, 2012 5:09:35 PM org.seleniumhq.jetty7.server.handler.ContextHandler startContext
@adamgoucher
adamgoucher / Browser 'shims' and Webdriver.md
Created November 21, 2012 16:58
Browser 'shims' and Webdriver
  • The stated long-term goal for the WebDriver project is to be the reference implementation of the W3C browser automation standard from a client perspective

  • The browser vendors [w|s]ould provide 'shims' which know about the WebDriver JSON protocol

  • Google and Opera do already, Mozilla will shortly with Marionette

  • PhantomJS (non-vendor) is 'ready'

  • The Se project produces one for IE (which would be happily handed off to MS should they come to the table)

  • shims will likely come in two types; jar or executables (depending on platform)

  • WebDriver comes in two flavours; WebDriver and Remote WebDriver (see every other naming rant I've gone on...)

@adamgoucher
adamgoucher / htmlvalidation.py
Created November 16, 2012 04:24
checking for valid html with python
import requests
import json
class ValidationException(Exception):
pass
class Element34(object):
def __init__(self, driver):
self.driver = driver
@adamgoucher
adamgoucher / ie.py
Created November 8, 2012 02:20
Ways to launch an IE instance with WebDriver
from selenium.webdriver import Ie
import selenium.common.exceptions
browser_amount = 0
#
# Method One: pass in the path to the server
#
try:
# because this is being handled 'as code', it needs to have the \'s escaped
@adamgoucher
adamgoucher / selectmenu.py
Created October 31, 2012 00:51
page object-ish class for jquery.ui.selectmenu and python webdriver
from selenium.common.exceptions import UnexpectedTagNameException
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.common.action_chains import ActionChains
class Selectmenu(object):
def __init__(self, webelement):
if webelement.tag_name.lower() != "select":
raise UnexpectedTagNameException(
"Selectmenu only works on <select> elements, not on <%s>" %
webelement.tag_name)