Saturday, August 30, 2014

Selenium Ruby Installation

In this post, we'll guide you how to install Selenium Ruby work well on both platform Win7-32b and Win7-64b

1. Ruby installation

Download Ruby and Devkit from here:    
Install Ruby with RubyInstaller (user should select Ruby version 1.9.3, this version is stable and work well on both Win7-32b and Win7-64b)

2.Devkit installation

Step 1: Extract Files
Left double-click the self-extracting executable (SFX) downloaded and choose a directory (without spaces) to install the DevKit artefacts into. For example, C:\DevKit. NOTE: the SFX is really a 7-Zip archive with a bit of embedded magic. If you already have7-Zip installed, you can simply right-click it and extract its contents as you would a normal 7z archive. In the instructions that follow, the directory that you selected is identified as <DEVKIT_INSTALL_DIR>. NOTE: Do not rename this directory because once you install the path is hardcoded into the Ruby installation.
Step 2: Run Installation Scripts
Open cmd window
ruby dk.rb init to generate the config.yml file to be used later in this Step. Your installed Rubies will be listed there (only those installed by a RubyInstaller package are detected at present).
edit the generated config.yml file to include installed Rubies not automatically discovered or remove Rubies you do not want to use the DevKit with.
[optional] ruby dk.rb review to review the list of Rubies to be enhanced to use the DevKit and verify the changes you made to it are correct.
finally, ruby dk.rb install to DevKit enhance your installed Rubies. This step installs (or updates) an operating_system.rb file into the relevant directory needed to implement a RubyGems pre_install hook and a devkit.rb helper library file into<RUBY_INSTALL_DIR>\lib\ruby\site_ruby. NOTE: you may need to use the
--force option to update (with backup of the originals) the above mentioned files as discussed at the SFX DevKit upgrade FAQ entry.
Refer Devkit installation here: 
We will install gem from Command Line window. Below is necessary gem list:

gem install activesupport
gem install selenium-client
gem install selenium-webdriver
gem install rspec
gem install spreadsheet
gem install capybara
gem install ruby-debug-ide

Notes: View the list of installed gems: gem query --local
-    Download (select the latest one) at here:
-    Extract file and drop it in C:\Windows\System32

No comments:

Post a Comment