Wednesday, September 3, 2014

Basic Web Testing with Selenium WebDriver With Ruby 2.0.0



1. Install Node and Ruby on windows

D:\Selinium Tests\1>ruby -v
ruby 2.0.0p481 (2014-05-08) [x64-mingw32]

2. Install Selinium Web Driver 
gem install selenium-webdriver

If no web driver installed you will get bellow error on windows
C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- selenium-webdriver (LoadError)
        from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from 1.rb:2:in `<main>'


3. Install Chrome & IEDriverServer Driver
Copy the chromedriver.exe to  C:/Ruby200-x64/bin or any classpath location
Copy the IEDriverServer.exe to   C:/Ruby200-x64/bin or any classpath location

4. Install HTTP server locally and create a folder name ruby under htdocs
5. Copy All the *.rb and *.html files to above folder in (4)
6. Execute each ruby file as 
>ruby xxx.rb

Download the example file from Examples

No comments:

Post a Comment