Thanks in advance.
host73:~ employee$ sudo gem install selenium-webdriver --no-ri --no-
rdoc
Building native extensions. This could take a while...
ERROR: Error installing selenium-webdriver:
ERROR: Failed to build gem native extension.
/opt/local/bin/ruby extconf.rb
checking for ffi.h in /usr/local/include,/opt/local/include... no
checking for ffi_call() in -lffi... yes
checking for ffi_prep_closure()... yes
checking for ffi_raw_call()... no
checking for rb_thread_blocking_region()... no
creating extconf.h
creating Makefile
make
/usr/bin/gcc-4.2 -I. -I. -I/opt/local/lib/ruby/1.8/i686-darwin10 -I. -
DRUBY_EXTCONF_H=\"extconf.h\" -I/opt/local/include -D_XOPEN_SOURCE -
D_DARWIN_C_SOURCE -I/opt/local/include -fno-common -O2 -arch x86_64 -
fno-common -pipe -fno-common -Werror -Wunused -Wformat -Wimplicit -
Wreturn-type -arch x86_64 -c AbstractMemory.c
In file included from AbstractMemory.h:37,
from AbstractMemory.c:36:
Types.h:74:17: error: ffi.h: No such file or directory
In file included from Types.h:75,
from AbstractMemory.h:37,
from AbstractMemory.c:36:
Type.h:44: error: expected specifier-qualifier-list before ‘ffi_type’
In file included from AbstractMemory.c:38:
Function.h:52: error: expected specifier-qualifier-list before
‘ffi_type’
make: *** [AbstractMemory.o] Error 1
Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/
ffi-0.5.4 for inspection.
Anyone seen this before on install?
Thanks again.
Once that was installed I was able to do:
gem install selenium-webdriver
gem install watir-webdriver --pre
However when I try to run my scripts I get the following error:
/opt/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.7/lib/watir/
exceptions.rb:12: superclass mismatch for class UnknownObjectException
(TypeError)
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/safariwatir-0.3.7/lib/
safariwatir.rb:1
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
from /Users/employee/watir_site_regression/
spec_helper_site_regression.rb:3
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from ./specs/login_and_registration_spec.rb:1
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load_files'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `each'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `load_files'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
options.rb:107:in `run_examples'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
command_line.rb:9:in `run'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/bin/spec:4
from /opt/local/bin/spec:19:in `load'
from /opt/local/bin/spec:19
I comment out safariwatir in my require section and rerun my tests and
get:
/opt/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.5/lib/watir/
exceptions.rb:12: superclass mismatch for class UnknownObjectException
(TypeError)
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.5/lib/watir/
waiter.rb:1
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from /opt/local/lib/ruby/gems/1.8/gems/commonwatir-1.6.5/lib/watir.rb:
5
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
36:in `require'
from /Users/employee/watir_site_regression/
spec_helper_site_regression.rb:4
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
from ./specs/login_and_registration_spec.rb:1
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:15:in `load_files'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `each'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
example_group_runner.rb:14:in `load_files'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
options.rb:107:in `run_examples'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/lib/spec/runner/
command_line.rb:9:in `run'
from /Users/employee/.gem/ruby/1.8/gems/rspec-1.2.8/bin/spec:4
from /opt/local/bin/spec:19:in `load'
from /opt/local/bin/spec:19
Anyone know what might be causing the and how to fix?
Thanks.
require 'rubygems'
require 'watir-webdriver'
require 'safariwatir'
require 'watir'
require 'spec'
require 'firewatir'
require 'curb'
require 'hpricot'
require 'yaml'
If I comment out watir-webdriver my tests work fine but apparently
having that with safariwatir doesn't work. However when I comment out
safariwatir it still doesn't work as it gives and error with
commonwatir which is not required. I am trying to make the code
generic for all browsers by doing the following:
def start_browser
if WHICH_BROWSER == 'safari' then
Watir::Browser.default = WHICH_BROWSER
@browser = Watir::Browser.new
else
@browser = Watir::Browser.new(:WHICH_BROWSER)
end
end
Would love to get this working. And ideas?
If not then I will wait for the jssh version for 3.6.
Thanks
On Jan 29, 5:03 am, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
def start_browser
if WHICH_BROWSER == 'safari' then
require 'safariwatir'
requite 'watir'
@browser = Watir::Safari.new
else
require 'web-webdriver'
require 'firewatir'
require 'watir'
@browser = Watir::Browser.new(:WHICH_BROWSER)
end
end
It works fine for safari but if I try it with firefox I get the
following error:
TypeError in 'Check that site registration works correctly should
register the user'
superclass mismatch for class UnknownObjectException
shared_functions_watir.rb:43:in `start_browser'
On Jan 29, 10:55 am, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
you can use this for your .mozconfig:
mk_add_options MOZ_MAKE_FLAGS="-j4"
ac_add_options --enable-application=browser
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-jssh
ac_add_options --enable-extensions=default,jssh