class Selenium::WebDriver::Remote::Bridge
def convert_locator(how, what)
def convert_locator(how, what) how = SearchContext::FINDERS[how.to_sym] || how case how when 'class name' how = 'css selector' what = ".#{escape_css(what.to_s)}" when 'id' how = 'css selector' what = "##{escape_css(what.to_s)}" when 'name' how = 'css selector' what = "*[name='#{escape_css(what.to_s)}']" end if what.is_a?(Hash) what = what.each_with_object({}) do |(h, w), hash| h, w = convert_locator(h.to_s, w) hash[h] = w end end [how, what] end