Back
How should I setup Selenium WebDriver working with selenium-webdriver gem through google university.
First install the gem selenium-webdriver:
gem install selenium-webdriver
Then start your ruby program:
#You need to require the gem "selenium-driver"require "selenium-webdriver"#... see webdriver ruby api docs here: http://selenium.googlecode.com/svn/trunk/docs/api/rb/_index.html#... Most usefull classes are Driver and Element, check them out for a good startdriver = Selenium::WebDriver.for :firefoxdriver.navigate.to "http://www.google.com"element = driver.find_element(:name, 'q')element.send_keys "Hello WebDriver!"element.submitputs driver.titledriver.quit
Want to learn Selenium, checkout our Selenium training.
31k questions
32.8k answers
501 comments
693 users