Module: Capybara::Cuprite

Defined in:
lib/capybara/cuprite/browser/page.rb,
lib/capybara/cuprite/errors.rb,
lib/capybara/cuprite/browser.rb,
lib/capybara/cuprite/version.rb,
lib/capybara/cuprite/browser/dom.rb,
lib/capybara/cuprite/browser/net.rb,
lib/capybara/cuprite/browser/frame.rb,
lib/capybara/cuprite/browser/input.rb,
lib/capybara/cuprite/browser/client.rb,
lib/capybara/cuprite/browser/process.rb,
lib/capybara/cuprite/browser/runtime.rb,
lib/capybara/cuprite/browser/targets.rb,
lib/capybara/cuprite/browser/web_socket.rb,
lib/capybara/cuprite/driver.rb,
lib/capybara/cuprite/cookie.rb,
lib/capybara/cuprite/node.rb,
lib/capybara/cuprite.rb

Overview

RemoteObjectId is from a JavaScript world, and corresponds to any JavaScript object, including JS wrappers for DOM nodes. There is a way to convert between node ids and remote object ids (DOM.requestNode and DOM.resolveNode).

NodeId is used for inspection, when backend tracks the node and sends updates to the frontend. If you somehow got NodeId over protocol, backend should have pushed to the frontend all of it’s ancestors up to the Document node via DOM.setChildNodes. After that, frontend is always kept up-to-date about anything happening to the node.

BackendNodeId is just a unique identifier for a node. Obtaining it does not send any updates, for example, the node may be destroyed without any notification. This is a way to keep a reference to the Node, when you don’t necessarily want to keep track of it. One example would be linking to the node from performance data (e.g. relayout root node). BackendNodeId may be either resolved to inspected node (DOM.pushNodesByBackendIdsToFrontend) or described in more details (DOM.describeNode).

Defined Under Namespace

Modules: Network Classes: Browser, BrowserError, ClientError, Cookie, DeadBrowser, Driver, Error, FrameNotFound, InvalidSelector, JavaScriptError, MouseEventFailed, NoSuchWindowError, Node, NodeError, ObsoleteNode, ScriptTimeoutError, StatusFailError, TimeoutError

Constant Summary collapse

VERSION =
"0.5.0"

Class Method Summary collapse

Class Method Details

.mac?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/capybara/cuprite.rb', line 20

def mac?
  RbConfig::CONFIG["host_os"] =~ /darwin/
end

.mri?Boolean

Returns:

  • (Boolean)


24
25
26
# File 'lib/capybara/cuprite.rb', line 24

def mri?
  defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby"
end

.windows?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/capybara/cuprite.rb', line 16

def windows?
  RbConfig::CONFIG["host_os"] =~ /mingw|mswin|cygwin/
end