This topic has been closed. No new entries allowed.
Reason: You can now post comments on articles on Dev Opera
You need to be logged in to post in the forums. If you do not have an account, please sign up first.
Getting started with OperaWatir
This article provides an easy introduction to Opera Watir, the perfect solution for all your automated website testing needs.( Read the article )
I've:
- installed JRuby 1.6 for windows
- installed operawatir with jruby -S gem install operawatir
- installed Microsoft Visual C++ 2010 Redistributable Package (x86)
than:
- created a test file "Test1.rb"
with the content:
require 'rubygems'
require 'operawatir'
browser = OperaWatir::Browser.new
browser.goto 'http://maps.google.com/?hl=en'
- got to the console:
D:\Share\Extensions\Tests>jruby Test1.rb
NativeException: org.openqa.selenium.WebDriverException: Launcher not available,
please set it in path or use the JAR file
System info: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.versi
on: '1.6.0_24'
Driver info: driver.version: OperaDriver
initialize at D:/Share/Extensions/Tests/jruby-1.6.0/lib/ruby/gems/1.8/gems/ope
rawatir-0.4-java/lib/operawatir/browser.rb:25
(root) at Test1.rb:4
So, how i get this now to work? i don't like to add an environment variable because i want to be flexible. I want to test with more than one opera version in a row, so i like to pass the script which opera it should take.
Originally posted by Muzzlehatch:
Any news on getting this into Selenium? I was hoping to try driving Opera from Python. I've just checked out selenium trunk but have to admit that I don't see how I can get a local build of Selenium with Opera from the instructions linked above. Simply add a module in maven?
I'm working on getting it in to Selenium right now, actually. I should have a prototype working in a couple of weeks. So when it's in, you should correctly be able to use the Python bindings that they have developed.
Originally posted by timmi:
I've:
- installed JRuby 1.6 for windows
- installed operawatir with jruby -S gem install operawatir
- installed Microsoft Visual C++ 2010 Redistributable Package (x86)
[…]
So, how i get this now to work? i don't like to add an environment variable because i want to be flexible. I want to test with more than one opera version in a row, so i like to pass the script which opera it should take.
Can you try JRuby 1.5.5 or earlier? There is a problem with newer versions of JRuby we haven't been able to track down yet. Let me know if that doesn't work.
Originally posted by andreastt:
Can you try JRuby 1.5.5 or earlier?
Yes, works now.
P.S. maybe you can write in the article or the documentation that you can use "operawatir --help" to get more parameters.