Skip to content

Instantly share code, notes, and snippets.

@bbbco
bbbco / test_benchmark_location_strategies.rb
Created January 10, 2014 05:24
Ruby Script comparing CSS to XPath location strategies
require 'rubygems'
require 'selenium-webdriver'
require 'benchmark'
require 'benchmark/ips'
require 'pry'
LOCATORS = {
:dues_header_id_and_class => {
:css => "#table2 thead .dues",
:xpath => "//table[@id='table2']//thead//*[@class='dues']"
@bbbco
bbbco / config_vars.rb
Created January 15, 2014 23:18
Sample of SWD config
# $> URL=theinternet BROWSER=firefox rspec spec/
URL_CONFIG = {
"theinternet" => {
:url => "http://the-internet.herokuapp.com",
:type => "staging"
},
"elemental-selenium" => {
:url => "http://elemental-selenium.com",
:type => "production"
@bbbco
bbbco / tables_po.rb
Last active January 4, 2016 02:19
A simple example gist of a theoretical SWD Page Object gem based on using dot notation object oriented hierarchy for mapping and accessing elements on a page.
class TablesPage < Selenium::Pages::Page
// Define url to visit and matchers
url "/tables"
url_matcher /tables/
// Creates a new Element object that is required (i.e. expects to be visible at page load)
required_element :header, :css => "h3"
// Can also define multiple elements. Not specifying requirement only means it is expected to be present
@bbbco
bbbco / keybase.md
Created March 15, 2017 20:25
Keybase Announcement

Keybase proof

I hereby claim:

  • I am bbbco on github.
  • I am bdgoad (https://keybase.io/bdgoad) on keybase.
  • I have a public key ASCDJf4_be7ZK_S7SBNP0UvXUUDL8ag2p82iJJ9dM8ZB5wo

To claim this, I am signing this object:

042f5716442f8724a5ce9c5785a93e0bf66eef2137b1d1bdd098a43f89dfe83a9f6e71aa4b3919a4ef8d59ecc8cbce0c2629b36b6ad71e1834a506d8f4547f7120
@bbbco
bbbco / Wordle_Words_with_Various_Characterstics.txt
Last active October 26, 2022 14:15
Five letter words with various characteristics #Wordle
# List of five letter words that were pulled from the *nix wordlist /usr/share/dict/words
# Converts PDF file passed into script into PNG files. Requires Ghostscript to be installed.
# Based on https://github.com/DeadExecutive/pdf_to_png/blob/main/PDF_To_PNG.ps1
#
# To enable drag and drop files, create a desktop shortcut with this command:
# powershell.exe -noprofile -noexit -File "C:\Path\To\ConvertPDFToPNGs.ps1"
# Input PDF path as an argument
param (
[Parameter(ValueFromRemainingArguments=$true)]
$pdfPath