Getting Constructor Not Found (Ruby Java Bridge, RJB)

A

Anukul Singhal

Hi,

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

require 'rjb'

classpath = "<jar file path>"
Rjb::load(classpath, ["-DMC_HOME=<dir>"])

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/brows...om/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
 

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top