Skip to content

Instantly share code, notes, and snippets.

Last active August 15, 2017 22:46
What would you like to do?
IRB Selenium example
#our REPL of choice is irb, could also use pry
#require the selenium webdriver library
require 'selenium-webdriver'
#launch chrome as our driver
driver = Selenium::WebDriver.for :chrome
#navigate to google
driver.get ''
#search google
element = driver.find_element :name => 'q'
element.send_keys 'Kenst'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment