Module: Selenium::WebDriver::AccessibilityNode::Wire Private
| Relationships & Source Files | |
| Defined in: | rb/lib/selenium/webdriver/common/accessibility_snapshot.rb |
Overview
The BiDi remote value shapes the snapshotter reads around the JSON text.
Class Method Summary
-
.context_of(window)
Internal use only
mod_func
The browsing context id of a window remote value; nil for a frame with no reachable context.
- .object_fields(value) Internal use only mod_func
- .shared_id(node) Internal use only mod_func
- .string(value) Internal use only mod_func
Class Method Details
.context_of(window) (mod_func)
The browsing context id of a window remote value; nil for a frame with no reachable context.
# File 'rb/lib/selenium/webdriver/common/accessibility_snapshot.rb', line 152
def context_of(window) return nil unless window['type'] == 'window' window.dig('value', 'context') end
.object_fields(value) (mod_func)
[ GitHub ]# File 'rb/lib/selenium/webdriver/common/accessibility_snapshot.rb', line 128
def object_fields(value) unless value['type'] == 'object' raise Error::WebDriverError, "accessibility snapshot: expected an object remote value, got #{value['type'].inspect}" end # A property name is written as a plain string, or as a string remote value. value.fetch('value', []).to_h { |key, entry| [key.is_a?(String) ? key : string(key), entry] } end