Created
April 10, 2013 19:25
-
-
Save bbbco/5357668 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 'rubygems' | |
require 'selenium-webdriver' | |
#path = File.expand_path("test.html") | |
#File.open(path, "w") { |io| io << DATA.read } | |
@browser = Selenium::WebDriver.for :firefox # replace :firefox with the browser you're having trouble with | |
begin | |
@browser.get "http://www.reverbnation.com" | |
fa = @browser.find_element(:css => "div#featured_artists div.po_frame.small:not(.hidden)") | |
# This works with SWD 2.31.0, but not 2.32.0 | |
# Now, interesting enough, the "a.play" is not technically displayed (visible) | |
# so I'm not sure why it even worked before 2.32.0 :) | |
fa.find_element(:css => "div.about a.play").click | |
ensure | |
@browser.quit | |
end | |
#__END__ | |
#<!DOCTYPE html> | |
#<html> | |
#<head> | |
# <meta charset="utf-8"> | |
# <title>Page Title</title> | |
#</head> | |
#<body> | |
# <!-- your HTML here --> | |
#</body> | |
#</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment