Hello! How is it possible to open FireFox browser by Ruby(for automation script)? I use @browser = RSpecSeleniumHelper.connect_browser('/admin/', '*firefox'), but it doesn't work.
+4
A:
You can start any program in ruby with:
`firefox http://www.google.com`
or
system("firefox http://www.google.com")
Stevens
2009-01-12 13:10:29
You can use %x[firefox http://www.google.com] as well.
khelll
2009-09-15 02:50:39
A:
You can use Watir, as it supports Firefox also: http://wtr.rubyforge.org/platforms.html
Jimmy Schementi
2009-09-15 00:48:21
A:
You may have to check if the Selenium Remote Control is start or not, normally it is running at port 4444.
java -jar selenium-server-xxx.jar
then you can use
@browser = Selenium::Client::Driver.new(
:host => "localhost",
:port => 4444,
:browser => "*firefox", #*iexplore, *firefox3, *safari...
:url => "http://www.google.com/",
:timeout_in_second => 60)
@browser.start_new_browser_session
Hope this helps, you can find more demo by download Selenium RC
Jirapong
2009-09-15 00:58:22