Skip to content

Instantly share code, notes, and snippets.

View m8ttyB's full-sized avatar

Matt B m8ttyB

  • Nope
  • Earth
View GitHub Profile
# coding: utf-8
from selenium.webdriver import Firefox
from selenium.webdriver.common.by import By
f = Firefox()
f.get('https://crash-stats.mozilla.org')
l = f.find_element(By.CSS_SELECTOR, '#advanced-search .select2-container-active')
for i in range(2):
print 'displayed: {}, size: {}, location{}'.format(l.is_displayed(), l.size, l.location)
#!/bin/bash
set -o errexit
echo "Plug in your device"
adb wait-for-device
echo "Found device"
#dir=$(mktemp -d -t revision)
dir=$(mktemp -d -t revision.XXXXXX)
if [!dir]; then
mkdir dir
fi
@m8ttyB
m8ttyB / gist:3908174
Created October 17, 2012 21:04 — forked from davehunt/gist:2988477
Conditional xfails for pytest-mozwebqa tests.
import pytest
class TestConditionalXFails:
@pytest.mark.xfail("config.getvalue('platform') == 'MAC'")
def test_xfail_platform(self, mozwebqa):
assert False
@pytest.mark.xfail("config.getvalue('browser_name') == 'firefox'")
Workflow:
From forked & updated repo:
create branch
Either:
-git branch litmus_11759_test_blank_search (create branch)
-git checkout litmus_11759_test_blank_search (switch to that branch)
or:
-git checkout -b litmus_11759_test_blank_search (create & switch to branch)