How to run Selenium RC with Ruby codes
1. Download seleniumRC from –> http://bit.ly/j_sel_rc
2. Unzip the file
3. commans prompt>java -version –> Version should grater than 1.6.0_5
4. command prompt go to –> C:\selenium-remote-control-1.0.1\selenium-server-1.0.1>java -jar selenium-server.jar
Now Selenium runs on 4444 port.
5. cmd prompt>gem install selenium-client
6. Open new command prompt and goto ruby program path.In Ex, c:\test>ruby code.rb
7. code.rb
require “selenium”
require “test/unit”
class Untitled < Test::Unit::TestCase
def setup
@verification_errors = []
if $selenium
@selenium = $selenium
else
@selenium = Selenium::SeleniumDriver.new(“localhost”, 4444, “*chrome”, “http://change-this-to-the-site-you-are-testing/”, 10000);
@selenium.start
end
@selenium.set_context(“test_untitled”)
end
def teardown
@selenium.stop unless $selenium
assert_equal [], @verification_errors
end
def test_untitled
@selenium.open “/”
@selenium.click “link=jazzez-news.exe released (using Mechanize – ruby gem)”
@selenium.wait_for_page_to_load “30000″
@selenium.click “link=exact:http://bit.ly/j_news_demo”
end
end
8. Selenium RC will give some outputs in new firefox window.
Any more details need then just ping me at jazzezravi@gmail.com



Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago