Skip to content

Instantly share code, notes, and snippets.

View AutomatedTester's full-sized avatar

David Burns AutomatedTester

View GitHub Profile
AutomatedTester> David Burns jgraham: morning!
9:05 AM I was reading https://github.com/w3c/webdriver/issues/1503 which makes perfect sense
9:05 AM I have some questions
9:07 AM What should happen if there multiple "realms" and people have requested different things from each realm at different times. Simplistic example: If I set up logging in each realm, will data be coming back from those realms simultaneously?
9:08 AM Not for the spec: how would people move between realms and know what realms are available to them?
9:08 AM → simonstewart joined (~simonstewart@publics.cloak)
9:26 AM
<AutomatedTester> David Burns What is the default realm? What defaults are we setting in the on the realms?
10:05 AM
<jgraham> AutomatedTester: Yeah, good questions. My working assumption is that we will support targetting multiple realms, and getting events from multiple realms simultaneously. Each command/event will come with a realm id
@AutomatedTester
AutomatedTester / Selenium-vs-python.sql
Created April 8, 2020 09:04
The following shows the downloads per selenium file for the last 30 days as of 8 April 2020
SELECT
file.filename,
REGEXP_EXTRACT(details.python, r"[0-9]+\.[0-9]+") AS python_version,
COUNT(*) AS downloads
FROM `the-psf.pypi.downloads*`
WHERE file.project = 'selenium'
-- Only query the last 30 days of history
AND _TABLE_SUFFIX
BETWEEN FORMAT_DATE(
'%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
@AutomatedTester
AutomatedTester / puppeteer_log_processor.py
Last active December 21, 2019 09:23
Processor that goes through a debug log of puppeteer and gives a count of all the commands and events used
import re
import sys
def process(file_):
raw_lines = []
with open(file_, "r") as f:
raw_lines = f.read()
lines = raw_lines.split('\n')
import configparser
import glob
import os
import errno
CSS_IMPORT_PATH = "testing/web-platform/tests/css/vendor-imports/mozilla/mozilla-central-reftests/text-decor-3/"
CSS_IMPORT_META_PATH = "testing/web-platform/meta/css/vendor-imports/mozilla/mozilla-central-reftests/text-decor-3/"
def get_ini(test_file):
  • Checkout Mozilla Central hg clone https://hg.mozilla.org/mozilla-central/
  • Prep everything for building Firefox. cd mozilla-central ./mach bootstrap NOTE: When asked if you want artifact builds answer yes! This will download native code instead of compiling!
  • Build Firefox ./mach build faster
  • Enable building GeckoDriver echo "ac_add_options --enable-geckodriver" >> .mozconfig
Merging: //dotnet/src/webdriver:webdriver as build\dotnet\dist\net40\WebDriver.dll
Warning raised by BUCK file parser: File "C:\Users\David Burns\Documents\GitHub\selenium\buck-out\tmp\buck_run.5btcte\
buck3768320627896750643.py", line 3
Warning raised by BUCK file parser: sys.path.insert(0, ""C:/Users/David Burns/Documents/GitHub/selenium/.buckd/resou
rces/5e98ee1d19efe31732813b8f7418c35e135f80b2"")
Warning raised by BUCK file parser: ^
Warning raised by BUCK file parser: SyntaxError: invalid syntax
BUILD FAILED: Parse error for build file C:\Users\David Burns\Documents\GitHub\selenium\java\client\test\org\openqa\sele
nium\environment\BUCK: Parser exited unexpectedly
[-] BUILDING...FINISHED 0.5s

Keybase proof

I hereby claim:

  • I am automatedtester on github.
  • I am automatedtester (https://keybase.io/automatedtester) on keybase.
  • I have a public key ASAse1LVhVw19MJZogsp63_OJR5mzlKPLyciVnwS90MRnwo

To claim this, I am signing this object:

# 1. Create a python virtual env
# 2. With that Virtual Env activated, and https://github.com/AutomatedTester/Bugsy/tree/set_cc checked out
# run python setup.py develop
# 3. Run the code below
import bugsy
bz = bugsy.Bugsy("dburns@mozilla.com", "password", bugzilla_url="https://bugzilla-dev.allizom.org/rest")
bug = bugsy.Bug()
bug.summary = "I love cheese"
bug.add_comment('I do love sausages')
[root]
name = "wires"
version = "0.4.1"
dependencies = [
"argparse 0.2.0 (git+https://github.com/tailhook/rust-argparse.git)",
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"mozprofile 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"mozrunner 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.lock b/Cargo.lock
index ab5e8da..cfac997 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,7 +4,7 @@ version = "0.4.0"
dependencies = [
"argparse 0.2.0 (git+https://github.com/tailhook/rust-argparse.git)",
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "hyper 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
+ "hyper 0.6.14 (registry+https://github.com/rust-lang/crates.io-index)",