From: sto.mar@... Date: 2012-12-05T03:50:40+09:00 Subject: Re: selenium-webdriver + puts page title Am 04.12.2012 18:43, schrieb Mattias A.: > 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,) > @driver.find_element(:id, "q") > puts "Page title is #{@driver.title}" > end > > test = Find_element.new > test.by_id > end First, you have a misplaced `end' (the last one). I cannot reproduce your error messages, but for me the code results in a TimeOut error, because there is no element with id='q'. Changing :id to :name works fine (or try with an id that actually exists on the page). --