Hi,

I got it to work according to your code but I am getting this error message 
when my script try to click on a button:

Selenium::WebDriver::Error::UnknownError: java.lang.String cannot be cast 
to net.sourceforge.htmlunit.corejs.javascript.Function 
(java.lang.ClassCastException)

Are there ways to resolve my issue? 

On Thursday, 19 April 2012 04:03:34 UTC+1, cootcraig wrote:
>
>
> I followed the example in this blog: 
>
> http://watirmelon.com/2010/12/14/watir-webdriver-a-detailed-introduction/ 
> I grabbed the selenium-server-standalone jar and put in my app folder 
>
> # This is working on Windows/JRuby! 
>
> require "rubygems" 
> require "bundler/setup" 
>
> require "watir-webdriver" 
> require 'selenium/server' 
>
> server = Selenium::Server.new("selenium-server- 
> standalone-2.0b1.jar", :background => true) 
> server.start 
>
> include Selenium 
> capabilities = 
> WebDriver::Remote::Capabilities.htmlunit(:javascript_enabled => true) 
> b = Watir::Browser.new(:remote, :url => 'http://127.0.0.1:4444/wd/ 
> hub', :desired_capabilities => capabilities) 
>
> # Browser fun here 
>
> b.close 
> server.stop 
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to