Last active
August 15, 2017 22:46
-
-
Save ckenst/30858fc46291c872ef377876ddbd325f to your computer and use it in GitHub Desktop.
IRB Selenium example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#our REPL of choice is irb, could also use pry | |
irb | |
#require the selenium webdriver library | |
require 'selenium-webdriver' | |
#launch chrome as our driver | |
driver = Selenium::WebDriver.for :chrome | |
#navigate to google | |
driver.get 'http://www.google.com' | |
#search google | |
element = driver.find_element :name => 'q' | |
element.send_keys 'Kenst' | |
element.submit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment