class Selenium::WebDriver::Remote::Bridge

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

def find_elements_by(how, what, parent_ref = [])
  how, what = @locator_converter.convert(how, what)
  return execute_atom :findElements, Support::RelativeLocator.new(what).as_json if how == 'relative'
  parent_type, parent_id = parent_ref
  ids = case parent_type
        when :element
          execute :find_child_elements, {id: parent_id}, {using: how, value: what.to_s}
        when :shadow_root
          execute :find_shadow_child_elements, {id: parent_id}, {using: how, value: what.to_s}
        else
          execute :find_elements, {}, {using: how, value: what.to_s}
        end
  ids.map { |id| Bridge.element_class.new self, element_id_from(id) }
end