Created
November 23, 2015 16:23
-
-
Save tking16/44f74d8d25b713f3cb15 to your computer and use it in GitHub Desktop.
Amazon search for eloquent ruby task
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' | |
browse = Selenium::WebDriver.for :firefox | |
browse.get "http://amazon.co.uk" | |
search = browse.find_element name: "field-keywords" | |
search.send_keys "Eloquent Ruby" | |
search.submit | |
book = browse.find_element class: "a-color-price" | |
book.text | |
puts book.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Line 15 is redundant and does't do anything.