Getting Constructor Not Found (Ruby Java Bridge, RJB)

Hi,

I am a newbie to using RJB gem, and this is the issue I am facing.
Following is my code:

require ‘rjb’

classpath = “”
Rjb::load(classpath, ["-DMC_HOME="])

selenium_import =
Rjb::import(‘com.thoughtworks.selenium.DefaultSelenium’)

selenium_obj =
selenium_import.new_with_sig(“Ljava.lang.String;Ljava.lang.Integer;Ljava.lang.String;Ljava.lang.String;”,
“localhost”, 4444, “*iexplore”, “http://www.google.com”)

selenium_obj.open("/")
selenium_obj.type(“q”, “rubyist”)

When I run this code, I get the following error:

RuntimeError: Constructor not found in new_with_sig

I checked the constructor details of DefaultSelenium java class in
http://svn.openqa.org/fisheye/browse/~raw,r=1656/selenium-rc/trunk/website/java/com/thoughtworks/selenium/DefaultSelenium.html,
and matched the sig accordingly, but still I get the constructor error
everytime.

Any help to troubleshoot this will be very generous.

Thanks,
Anukul

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs