Skip to content

Instantly share code, notes, and snippets.

# open up only one browser and store it into global variable
RSpec.configure do |config|
config.before :suite do
$browser = Watir::Browser.new :chrome
Test::Page.browser = $browser
end
config.after :suite do
$browser.close
end
C:/tcs-ruby193_require_fenix_gc_hash_20120527/lib/ruby/gems/1.9.1/gems/rautomation-0.7.2/lib/rautomation/adapter
/win_32/functions.rb:317: [BUG] Segmentation fault
tcs-ruby 1.9.3p231 (2012-05-25, TCS patched 2012-05-27) [i386-mingw32]
-- Control frame information -----------------------------------------------
c:0038 p:---- s:0148 b:0148 l:000147 d:000147 CFUNC :enum_windows
c:0037 p:0080 s:0143 b:0143 l:001fa8 d:001fa8 METHOD C:/tcs-ruby193_require_fenix_gc_hash_20120527/lib/ruby/gems/1.9.1/gems/rautomation-0.7.2/lib/raut
omation/adapter/win_32/functio
c:0036 p:0013 s:0135 b:0135 l:0002d8 d:0002d8 METHOD C:/tcs-ruby193_require_fenix_gc_hash_20120527/lib/ruby/gems/1.9.1/gems/rautomation-0.7.2/lib/raut
omation/adapter/win_32/functio
Thread-9jnxc
looping.rb:17:in `block (2 levels) in <main>'
\_ looping.rb:15:in `each'
\_ looping.rb:15:in `block in <main>'
\_ looping.rb:22:in `call'
\_ looping.rb:22:in `condition'
\_ looping.rb:26:in `looping'
\_ looping.rb:31:in `<main>'
C:\>wget http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
--12:21:44-- http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
=> `linecache19-0.5.13.gem'
Resolving rubyforge.org... done.
Connecting to rubyforge.org[50.56.192.79]:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://files.rubyforge.vm.bytemark.co.uk/ruby-debug19/linecache19-0.5.13.gem [following]
--12:21:44-- http://files.rubyforge.vm.bytemark.co.uk/ruby-debug19/linecache19-0.5.13.gem
=> `linecache19-0.5.13.gem'
Resolving files.rubyforge.vm.bytemark.co.uk... done.
Failures:
1) Element finding with unknown tag name finds several elements from an element's subtree
Failure/Error: browser.fieldset.elements(:xpath => ".//label").length.should == 10
NoMethodError:
undefined method `elements_by_xpath' for #<Watir::FieldSet:0x5a7d5048 located=false how={} what=nil>
# ./watir/lib/watir/element.rb:518:in `method_missing'
# ./watir/lib/watir/locator.rb:96:in `locate_elements_by_xpath_css_ole'
# ./watir/lib/watir/locator.rb:14:in `each'
# ./watir/lib/watir/collections.rb:10:in `each'
b.goto "page"
while true
puts b.frame(:id => "...").exists?
sleep 0.1
end
diff --git a/file.c b/file.c
index 3107895..8bb0839 100644
--- a/file.c
+++ b/file.c
@@ -5117,7 +5117,7 @@ rb_find_file_ext_safe(VALUE *filep, const char *const *ext, int safe_level)
if (!ext[0]) return 0;
if (f[0] == '~') {
- fname = file_expand_path_1(fname);
+ fname = rb_funcall(rb_cFile, rb_intern("expand_path"), 1, fname);
# ruby 1.9.2p136
C:\>rails new empty-192 -d sqlite3
# ...
Using rails (3.1.1)
C:\empty-192>timer ruby script\rails runner ""
user system total real
0.000000 0.016000 0.016000 ( 28.808579)
C:\measurements>set RUBYOPT=
# ruby-1.9.3 from official RubyInstaller without fenix
C:\measurements>which ruby.exe
C:\Ruby193\bin\ruby.exe
C:\measurements>rci bench core_require_empty && rci bench core_require_nested
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
Rehearsal ------------------------------------------------------
core_require_empty 3.322000 10.171000 13.493000 ( 15.580468)
# lib/app/page/main.rb
module App
module Page
class Main < WatirSplash::Page::Base
# ...
def search_button
modify button(:name => "go"),
:click => lambda {redirect_to Results}
end