Skip to content

Instantly share code, notes, and snippets.

View cheezy's full-sized avatar

Jeff Morgan cheezy

  • Tango
  • Toronto, ON Canada
  • X @chzy
View GitHub Profile
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 -I. -Ijson -c -o DefaultsResponse.o -fvisibility=hidden -x objective-c -arch i386 -pipe -ggdb -std=c99 -DTARGET_OS_IPHONE -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk -F/System/Library/PrivateFrameworks -D__IPHONE_OS_VERSION_MIN_REQUIRED=30000 DefaultsResponse.m
@cheezy
cheezy / gist:1111624
Created July 28, 2011 14:18
html file used in my tests
<html>
<head>
<title>Static Elements Page</title>
</head>
<body>
<h2>Static Elements Page</h2>
<h3>Text Field</h3>
<input id="text_field_id" name="text_field_name" class="text_field_class"
@cheezy
cheezy / gist:1111651
Created July 28, 2011 14:34
stacktrace
c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.2.0/lib/selenium/webdriver/remote/response.rb:45:in `assert_ok': Unable to find element with xpath == .
//a[@id='link_id'] (Selenium::WebDriver::Error::UnexpectedJavascriptError)
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.2.0/lib/selenium/webdriver/remote/response.rb:15:in `initialize'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.2.0/lib/selenium/webdriver/remote/http/common.rb:53:in `new'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.2.0/lib/selenium/webdriver/remote/http/common.rb:53:in `create_response'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.2.0/lib/selenium/webdriver/remote/http/default.rb:56:in `request'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.2.0/lib/selenium/webdriver/remote/http/common.rb:34:in `call'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.2.0/lib/selenium/webdriver/remote/bridge.
Fetching: iCuke-0.6.3.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing iCuke:
ERROR: Failed to build gem native extension.
"/Users/cheezy/.rvm/rubies/ruby-1.9.2-p290/bin/ruby" -rubygems /Users/cheezy/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake RUBYARCHDIR=/Users/cheezy/.rvm/gems/ruby-1.9.2-p290/gems/iCuke-0.6.3/lib RUBYLIBDIR=/Users/cheezy/.rvm/gems/ruby-1.9.2-p290/gems/iCuke-0.6.3/lib
cd WaxSim && xcodebuild install DSTROOT=../../ INSTALL_PATH=/ext/bin
(in /Users/cheezy/.rvm/gems/ruby-1.9.2-p290/gems/iCuke-0.6.3/ext)
Build settings from command line:
DSTROOT = ../../
# fails if the following block doesn't run
page.browser.windows.each do |win|
puts “title is #{win.title}”
end
page.browser.window(:url => /mripage\.asp/).use do
page.save_preferences
end
Fetching: iCuke-0.6.5.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing iCuke:
ERROR: Failed to build gem native extension.
"/Users/cheezy/.rvm/rubies/ruby-1.9.2-p290/bin/ruby" -rubygems /Users/cheezy/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake RUBYARCHDIR=/Users/cheezy/.rvm/gems/ruby-1.9.2-p290@page-object/gems/iCuke-0.6.5/lib RUBYLIBDIR=/Users/cheezy/.rvm/gems/ruby-1.9.2-p290@page-object/gems/iCuke-0.6.5/lib
cd .. && git submodule init
(in /Users/cheezy/.rvm/gems/ruby-1.9.2-p290@page-object/gems/iCuke-0.6.5/ext)
fatal: Not a git repository (or any of the parent directories): .git
rake aborted!
@cheezy
cheezy / gist:1153827
Created August 18, 2011 10:55
nested frames example
--- frame_example.rb ---
require 'watir-webdriver'
browser = Watir::Browser.new :firefox
html = File.expand_path("#{File.dirname(__FILE__)}/nested_frames.html")
browser.goto "file://#{html}"
frame = browser.frame(:id => 'two').frame(:id => 'three').frame(:id => 'four').frame(:id => 'five')
frame.text_field(:id => 'text_field_id1').set('value1')
frame.text_field(:id => 'text_field_id2').set('value2')
@cheezy
cheezy / gist:1204812
Created September 8, 2011 21:31
Error when running gem command on Windows. Unable to install gems
Invalid gemspec in [C:/Ruby187/lib/ruby/gems/1.8/specifications/json_pure-1.5.4.gemspec]: invalid date format in specifi
cation: "2011-08-31 00:00:00.000000000Z"
Invalid gemspec in [C:/Ruby187/lib/ruby/gems/1.8/specifications/spruz-0.2.13.gemspec]: invalid date format in specificat
ion: "2011-08-17 00:00:00.000000000Z"
Invalid gemspec in [C:/Ruby187/lib/ruby/gems/1.8/specifications/watir-webdriver-0.3.2.gemspec]: invalid date format in s
pecification: "2011-08-18 00:00:00.000000000Z"
@cheezy
cheezy / gist:1206401
Created September 9, 2011 14:39
modal dialog issue
require 'rubygems'
require 'selenium-webdriver'
require 'pp'
dir = Dir.mktmpdir("modal-dialog")
htmls = DATA.read.scan(/--- (.+?) ---\n(.+?)(?=---|\z)/m)
htmls.each do |name, content|
File.open(File.join(dir, name), "w") { |io| io << content}
end
module PageHeader
include PageObject
text_field(:header_search, :id => 'header_search')
h1(:page_title, :index => 0)
end
module ErrorMessages
include PageObject