Sha256: cb6c015a980fed84fca2a1fc0d4e2cb96328ad20c13bd6e7f2bfc6a24f32ffcd

Contents?: true

Size: 425 Bytes

Versions: 2

Compression:

Stored size: 425 Bytes

Contents

module Selenium
class Link
  attr_reader :browser
  
  def Link::by_id(browser, id)
    Link.new(browser, "id=#{id}")
  end
  
  def Link::by_text(browser, text)
    Link.new(browser, "link=#{text}")
  end
  
  def initialize(browser, locator)
    @browser = browser
    @locator = locator
  end
  
  def click
    @browser.click(@locator)
  end
  
  def click_wait
    click
    @browser.wait_for_page_to_load
  end
end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
Selenium-1.0.1 lib/selenium/link.rb
Selenium-1.0.0 lib/selenium/link.rb