class Selenium::WebDriver::ShadowRoot
Constants
- ROOT_KEY
Attributes
bridge[R]
Public Class Methods
new(bridge, id)
click to toggle source
Creates a new shadow root
@api private
# File lib/selenium/webdriver/common/shadow_root.rb, line 33 def initialize(bridge, id) @bridge = bridge @id = id end
Public Instance Methods
==(other)
click to toggle 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?
as_json(*)
click to toggle source
For Rails 3 - jonathanjulian.com/2010/04/rails-to_json-or-as_json/
@api private
# File lib/selenium/webdriver/common/shadow_root.rb, line 77 def as_json(*) {ROOT_KEY => @id} end
hash()
click to toggle source
# File lib/selenium/webdriver/common/shadow_root.rb, line 47 def hash @id.hash ^ @bridge.hash end
inspect()
click to toggle 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
ref()
click to toggle source
@api private @see SearchContext
# File lib/selenium/webdriver/common/shadow_root.rb, line 56 def ref [:shadow_root, @id] end
to_json(*)
click to toggle source
Convert to a ShadowRoot
JSON Object for transmission over the wire. @see github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#basic-terms-and-concepts
@api private
# File lib/selenium/webdriver/common/shadow_root.rb, line 67 def to_json(*) JSON.generate as_json end