class Selenium::WebDriver::Remote::Bridge

def find_element_by(how, what, parent_ref = [])

def find_element_by(how, what, parent_ref = [])
  how, what = @locator_converter.convert(how, what)
  return execute_atom(:findElements, Support::RelativeLocator.new(what).as_json).first if how == 'relative'
  parent_type, parent_id = parent_ref
  id = case parent_type
       when :element
         execute :find_child_element, {id: parent_id}, {using: how, value: what.to_s}
       when :shadow_root
         execute :find_shadow_child_element, {id: parent_id}, {using: how, value: what.to_s}
       else
         execute :find_element, {}, {using: how, value: what.to_s}
       end
  Bridge.element_class.new self, element_id_from(id)
end