Created
April 24, 2019 16:21
-
-
Save shoesCodeFor/1150421b7ca3da33ae28b495fb681de8 to your computer and use it in GitHub Desktop.
Simple Firefox/Selenium Login
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
require "selenium-webdriver" | |
# Not quite sure where Selenium think the Firefox binary is by default | |
driver = Selenium::WebDriver.for :firefox | |
driver.navigate.to "http://duckduckgo.com" | |
element = driver.find_element(name: 'q') | |
element.send_keys "Selenium Firefox Ruby Bindings" | |
element.submit | |
puts driver.title | |
driver.quit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment