From: "Mattias A." Date: 2012-12-11T03:18:41+09:00 Subject: Re: Find element test with webdriver Thanks for your reply. According to array you mean something like below? But it output that the method not find the element but it should. Any ide? def by_id_array by_id = [] by_id << @driver.find_element(:id, "gbqfba") if by_id.empty? puts 'Did find element with Id: gbqfba' else puts 'Did not find element with id gbqfba' end end test = Find_element.new test.by_id_array --output-- Did not find element with id gbqfba -- Posted via http://www.ruby-forum.com/.