Required
Softwares to run Ruby scripts (for selenium automation) on windows7
- Ruby 1.9.3 Installation
- Ruby Devkit Installation
- Installing AutoIt and registering AutoIt DLLs
- Aptana Studio
1.
Ruby 1.9.3
Installation
For writing scripts in ruby you have to first install ruby
on your windows system. You can install latest version of Ruby from its home page but we recommend to go for Ruby 1.9.3 as it is mostly supported and compatible version at the time of writing this article. You can always
download the older versions of Ruby from ruby website. You can download the ruby files as an archive but we recommend to download the installer when you are installing ruby on windows as it is easy way of installing Ruby.
You can download Ruby installer for windows from here. Again, we recommend to go for Ruby 1.9.3.
Installation:
1.1. After
downloading Ruby1.9.3 installer, double click on ruby installer file (.exe) or executable and
accept the download confirmation box (if appear) by hitting “Yes” button.
1.2. Select
the following three options as shown in the figure below and proceed with the
installation by clicking on Install button.
Click FINISH button after installation
completes.
1.3. After
the installation completes check if Ruby is installed.
Open command prompt.
type: ruby --version and press enter.
If ruby is installed successfully it’ll
display the version number when you type “ruby --version” at command prompt.
2.
Ruby DevKit
Installation
What is DevKit?
DevKit is Development Toolkit for ruby installer that makes it easy to
build and use native C/C++ extensions. Some of the ruby libraries/gems makes use of functions written in a different language outside ruby like C/C++. For such gems to be installed on your machine first you would need DevKit support on your PC. Since we might come across such gems, we added this step to install Ruby DevKit in our tutorials.
DevKit Installation
NOTE: Please download DevKit specific to the Ruby version you installed
on your system.
2.2. After
downloading DevKit place it in a separate folder named "DevKit" under ruby
installation directory “C:\Ruby193”.
2.3. Unzip or extract DevKit file using software like WinZip.
After extracting the files run the following commands at command prompt:
C:\Ruby193\DevKit>ruby dk.rb init
After running the above command a file will be created named –
“config.yml”.
Now run:
C:\Ruby193\DevKit>ruby dk.rb install
After running the above commands DevKit path will be set.
For more details on Devkit installation refer this page.
3.
Installing AutoIt and registering
AutoIt DLLs
AutoIt
v3 is a freeware BASIC-like scripting language designed for automating the
Windows GUI and general scripting. It uses a combination of simulated keystrokes,
mouse movement and window/control manipulation in order to automate tasks in a
way not possible or reliable with other languages (e.g. VBScript and SendKeys).
AutoIt is also very small, self-contained and will run on all versions of
Windows out-of-the-box with no annoying “runtimes” required!
After installing AutoIt, set the path
environment variable to “C:\Program Files (x86)\AutoIt3\AutoItX” (For 64 bit
windows version) or
“C:\ProgramFiles\AutoIt3\AutoItX” (For 32 bit windows version).
4. Installing APTANA STUDIO
Aptana is open source development tool. It allows you to develop and test entire application at one place. It supports various languages such as HTML5, CSS3,
JavaScript, Ruby, Rails, PHP and Python. We are interested in writing our automation scripts in Ruby using Aptana Studio as IDE.
After downloading Aptana Studio3 installer, just like ant other windows installer, with the
default options selected finish installing the software.
Get Started: Reference to Ruby tutorials
Below are some of the references to pages where you can learn Ruby. Note that, to follow with rest of the tutorials on webdriver you are expected to have basic knowledge of Ruby programming language. So please do that before reading any further on Selenium-Webdriver.
0 comments:
Post a Comment