# File lib/selenium/web_page.rb, line 89 def element_locator(how, what=nil) locator = how if (not what.nil?) if (how == :xpath or how == :name or how == :id) locator = "#{how}=#{what}" else raise "couldn't understand how to build locator using #{how} with #{what}" end end locator end