Skip to content

Instantly share code, notes, and snippets.

View jags14385's full-sized avatar
:bowtie:
building stuff

Jags jags14385

:bowtie:
building stuff
View GitHub Profile
for DOTFILE in `find ~/code/dotfiles/aliases`
do
[ -f $DOTFILE ] && source $DOTFILE
done
@jags14385
jags14385 / Selenium Cheat Sheet.md
Created October 16, 2015 02:49 — forked from kenrett/Selenium Cheat Sheet.md
Selenium Cheat Sheet - Ruby

#Getting Started

##Webpage:

<html>
<head>
    <title>Testing with Ruby and Selenium WebDriver</title>
</head>
 
<body bgcolor="antiquewhite">
@jags14385
jags14385 / gist:d00b80cc1028125f3974
Created June 22, 2015 06:53
Element Locators for Selenium
// XPATH
driver.findElement(By.xpath("//*[contains(text(),'Component')]/../../tr[3]/td[2]/a"));
driver.findElement(By.cssSelector("td>input[type='submit']"));
driver.findElement(By.xpath("//*[@type='submit']/../../td[2]/input"));
@jags14385
jags14385 / Preferences.sublime-settings
Created April 27, 2015 00:13
Sublime Text 3 Settings
{
"color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme",
"font_size": 10.2,
"tab_size":2,
"translate_tabs_to_spaces": false,
"highlight_line": true,
"line_padding_bottom": 1,
"line_padding_top": 1,
"fade_fold_buttons": false,
"bold_folder_labels": true
@jags14385
jags14385 / ruby_util_code.rb
Created April 23, 2015 05:46
Ruby Utility Code Hacks
#output 20150423154623
timestamp=Time.now.inspect[0..18].tr("-: ","")
puts timestamp
@jags14385
jags14385 / pom.xml
Created February 26, 2015 04:45
The POM to run the Cucumber JVM tests with external Jars with The Runner Class
<?xml version="1.0" encoding="UTF-8"?>
<!--suppress ALL -->
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Project</groupId>
<artifactId>Project</artifactId>
@jags14385
jags14385 / UTF-8.sh
Created May 8, 2014 16:35
Mac OS X: ValueError: unknown locale: UTF-8 in Python
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
@jags14385
jags14385 / FileUploadSelenium
Last active August 29, 2015 13:58
Uploading files using Selenium
String fileName="/data/files_to_upload_text.txt";
File file = new File ( ResourceManager.class.getResource(fileName).toURI() );
String absoluteFilePath = file.getAbsolutePath();
fileUploadButton.sendKeys(absoluteFilePath);