Module: FlickrExample

Defined in:
lib/selenium-grid/examples/ruby/flickr_example.rb

Instance Method Summary collapse

Instance Method Details

#run_flickr_scenario(options) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/selenium-grid/examples/ruby/flickr_example.rb', line 3

def run_flickr_scenario(options)
  browser.open "/"
  page.location.should match(%r{http://images.google.com/})
  page.type "q", options[:search_string]
  page.click "btnG", :wait_for => :page
  page.click "link=Advanced Image Search", :wait_for => :page
  page.click "rimgtype4"
  page.click "sf"
  page.select "imgc", "full color"
  page.click "btnG", :wait_for => :page
  page.text?(options[:search_string].split(/ /).first).should be_true
end