Skip to content

Instantly share code, notes, and snippets.

View devinmancuso's full-sized avatar
🍕
🔥

Devin Mancuso devinmancuso

🍕
🔥
View GitHub Profile
@devinmancuso
devinmancuso / PythonAutoTabber.py
Last active August 29, 2015 14:10
Example Python Chrome Keyboard Navigation Automated Unit Testing Using Selenium 2 WebDriver ChromeDriver
# Import unittest module for creating unit tests
import unittest
# Import time module to implement
import time
# Import the Selenium 2 module (aka "webdriver")
from selenium import webdriver
# For automating data input
@devinmancuso
devinmancuso / cleanNBABookmarklet
Last active August 29, 2015 14:23
Remove any spoilers from NBA http://watch.nba.com/nba/ homepage bookmarklet
javascript:(function(e,a,g,h,f,c,b,d){
if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){
c=a.createElement("script");
c.type="text/javascript";
c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";
c.onload=c.onreadystatechange=function(){
if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){
h((f=e.jQuery).noConflict(1),b=1);
f(c).remove()}};
@devinmancuso
devinmancuso / minified
Last active August 29, 2015 14:24
Inject browser test status table template into Jira bug ticket description textarea
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.3.2",function($,L){var caretPos = document.getElementById("description").selectionStart;var textAreaTxt = $("#description").val();var txtToAdd = "\\\\\r\n\\\\\r\n*Testing status*\r\n|| OS X || || || WIN || || || || IPAD || || ANDROID || || || \r\n|| SAFARI || CHROME || FF || IE11 || IE10 || FF || CHROME || SAFARI || CHROME || INTERNET || CHROME || FF ||\r\n| (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) | (-) |\r\n\\\\\r\n\\\\\r\n";$("#description").val(textAreaTxt.substring(0, caretPos) + txtToAdd + textAreaTxt.substring(caretPos));});
@devinmancuso
devinmancuso / defect_injection
Last active November 7, 2015 01:52
Inject defect reporting template into Jira bug ticket description textarea
javascript:(function(e,a,g,h,f,c,b,d){
if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){
c=a.createElement("script");
c.type="text/javascript";
c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";
c.onload=c.onreadystatechange=function(){
if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){
h((f=e.jQuery).noConflict(1),b=1);
f(c).remove()}};
@devinmancuso
devinmancuso / ac_injection
Last active November 11, 2015 05:03
Acceptance Criteria Template Injection Bookmarklet
javascript:(function(e,a,g,h,f,c,b,d){
if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){
c=a.createElement("script");
c.type="text/javascript";
c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";
c.onload=c.onreadystatechange=function(){
if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){
h((f=e.jQuery).noConflict(1),b=1);
f(c).remove()}};
Verifying my Blockstack ID is secured with the address 14jaQq4nVjnNKjtJnFpx4PsqrFg1kUhbqX https://explorer.blockstack.org/address/14jaQq4nVjnNKjtJnFpx4PsqrFg1kUhbqX
@devinmancuso
devinmancuso / surveymonkeyselenium
Created February 19, 2015 23:54
Selenium Chromedriver to automate Survey Monkey
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("-incognito")
driver = webdriver.Chrome(executable_path='/Library/Python/2.7/site-packages/selenium/webdriver/chrome/chromedriver', chrome_options=chrome_options)
driver.get('https://www.surveymonkey.com/s/<surveyid>')
time.sleep(2)
nxt_btn = driver.find_element_by_name('NextButton')
@devinmancuso
devinmancuso / multibrowsertest.py
Last active August 19, 2021 04:50
Example Python Multiple Browser Automated Unit Testing Using Selenium 2 WebDriver (Chrome and Firefox Separately Defined)
# Import unittest module for creating unit tests
import unittest
# Import time module to implement
import time
# Import the Selenium 2 module (aka "webdriver")
from selenium import webdriver
# For automating data input
@devinmancuso
devinmancuso / driverarraylooper.py
Created December 5, 2014 06:46
Example Python Looping through array of drivers for multiple browser Automated Unit Testing Using Selenium 2 WebDriver
# Import unittest module for creating unit tests
import unittest
# Import time module to implement
import time
# Import the Selenium 2 module (aka "webdriver")
from selenium import webdriver
# For automating data input
The MIT License (MIT)
Copyright (c) 2014 Devin Mancuso <devin@radelaide.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: