Skip to content

Instantly share code, notes, and snippets.

@tking16
Created November 23, 2015 16:23
Show Gist options
  • Save tking16/44f74d8d25b713f3cb15 to your computer and use it in GitHub Desktop.
Save tking16/44f74d8d25b713f3cb15 to your computer and use it in GitHub Desktop.
Amazon search for eloquent ruby task
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
@dannysmith
Copy link

Line 15 is redundant and does't do anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment