- install ruby & devkit
http://rubyinstaller.org/downloads
- install dependencies then webdriver
http://rubygems.org/gems/selenium-webdriver
- load test script below
require 'rubygems'
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :firefox
driver.navigate.to "http://google.com"
element = driver.find_element(:name, 'q')
element.send_keys "Hello WebDriver!"
element.submit
puts driver.title
driver.quit
- watch the magic happens
UPDATE : 2012/05/10 0430H
if behind proxy,run
set HTTP_PROXY=http://%username%:%password%@%proxy-name-address%:8080
No comments:
Post a Comment