From: sto.mar@... Date: 2013-04-12T22:45:58+09:00 Subject: Re: question on watir Am 12.04.2013 08:27, schrieb Raj pal: > when i try to print the elements as you have explained, it throws the > same error, > > `each_element': undefined method `each' for nil:NilClass (NoMethodError) That's strange because in my example `each` has not been called at all... Anyway: What the error message is trying to convey to you is that you are trying to call `each` for an object that is nil: $ irb 1.9.3p392 :001 > a = nil => nil 1.9.3p392 :002 > a.each {|element| puts element } NoMethodError: undefined method `each' for nil:NilClass So, `$browser.elements` seems to be nil for some reason. --