class Selenium::WebDriver::ShadowRoot
Constants
- ROOT_KEY
Attributes
Public Class Methods
Source
# File lib/selenium/webdriver/common/shadow_root.rb, line 33 def initialize(bridge, id) @bridge = bridge @id = id end
Creates a new shadow root
@api private
Public Instance Methods
Source
# File lib/selenium/webdriver/common/shadow_root.rb, line 42 def ==(other) other.is_a?(self.class) && ref == other.ref end
Also aliased as: eql?
Source
# File lib/selenium/webdriver/common/shadow_root.rb, line 77 def as_json(*) {ROOT_KEY => @id} end
For Rails 3 - jonathanjulian.com/2010/04/rails-to_json-or-as_json/
@api private
Source
# File lib/selenium/webdriver/common/shadow_root.rb, line 47 def hash [@id, @bridge].hash end
Source
# File lib/selenium/webdriver/common/shadow_root.rb, line 38 def inspect format '#<%<class>s:0x%<hash>x id=%<id>s>', class: self.class, hash: hash * 2, id: @id.inspect end
Source
# File lib/selenium/webdriver/common/shadow_root.rb, line 56 def ref [:shadow_root, @id] end
@api private @see SearchContext
Source
# File lib/selenium/webdriver/common/shadow_root.rb, line 67 def to_json(*) JSON.generate as_json end
Convert to a ShadowRoot
JSON Object for transmission over the wire. @see github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#basic-terms-and-concepts
@api private