Skip to content

Instantly share code, notes, and snippets.

View AutomatedTester's full-sized avatar

David Burns AutomatedTester

View GitHub Profile
import pytest
from selenium import webdriver
def test_this_awesomeness():
driver = webdriver.Firefox()
driver.get('http://www.duluxtradepaintexpert.co.uk/colours/picker')
title = driver.title
driver.quit()
print title
var callback = arguments[arguments.length - 1];
var any_activity_yet = false;
var checkInactive = function() {
var result = (window.jQuery != null) && (jQuery.active === 0);
if ((result == true) && (any_activity_yet == true)) {
return callback();
}
if (result == false) {
any_activity_yet = true;
}
  • 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...)

@AutomatedTester
AutomatedTester / test.html
Created May 21, 2012 09:41 — forked from bebef1987/test.html
selenium issue
<html>
<body>
<p onclick="this.textContent='Error';" style="pointer-events: none;">Pass</p>
</body>
</html>
# Using Selenium 2 and its native Python bindings for the first time...
# On Ubuntu 8.04 and Python 2.5.2
"""
# Checkout
$ svn checkout http://selenium.googlecode.com/svn/trunk/ webdriver
# Build the code
$ cd webdriver
$ sudo python setup.py build
Windows XP
[09:46] ~ $java -version
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
[09:59] ~ $ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
[09:59] ~ $python --version
Python 2.6.4