class Selenium::WebDriver::Support::RelativeLocator
def as_json
def as_json { relative: { root: @root, filters: @filters.map do |kind, filter| { kind: kind, args: [filter] } end } } end
def initialize(locator)
def initialize(locator) @filters, @root = locator.partition { |how, _| KEYS.include?(how) }.map(&:to_h) end