class Selenium::WebDriver::Support::RelativeLocator
@api private
Constants
- KEYS
Public Class Methods
new(locator)
click to toggle source
# File lib/selenium/webdriver/support/relative_locator.rb, line 30 def initialize(locator) @filters, @root = locator.partition { |how, _| KEYS.include?(how) }.map(&:to_h) end
Public Instance Methods
as_json()
click to toggle source
# File lib/selenium/webdriver/support/relative_locator.rb, line 34 def as_json { relative: { root: @root, filters: @filters.map do |kind, filter| { kind: kind, args: [filter] } end } } end