Hi,

Can anyone help me with why this fails? Thanks in advance.

require 'selenium-webdriver'
class Find_element

  def initialize
    @driver = Selenium::WebDriver.for :firefox
    @driver.get "http://google.com"
  end

  def by_id
    #By ID - driver.find_element(:id,<elementID>)
    @driver.find_element(:id, "q")
    puts "Page title is #{@driver.title}"
  end

test = Find_element.new
test.by_id
end

from lib/findElementMethod.rb:11:in `by_id'
from lib/findElementMethod.rb:16:in `<class:Find_element>'
from lib/findElementMethod.rb:2:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'

Process finished with exit code 1

-- 
Posted via http://www.ruby-forum.com/.