Module: Ferrum
- Defined in:
- lib/ferrum/page.rb,
lib/ferrum.rb,
lib/ferrum/node.rb,
lib/ferrum/mouse.rb,
lib/ferrum/browser.rb,
lib/ferrum/cookies.rb,
lib/ferrum/headers.rb,
lib/ferrum/targets.rb,
lib/ferrum/version.rb,
lib/ferrum/keyboard.rb,
lib/ferrum/page/dom.rb,
lib/ferrum/page/net.rb,
lib/ferrum/page/frame.rb,
lib/ferrum/page/input.rb,
lib/ferrum/page/runtime.rb,
lib/ferrum/browser/client.rb,
lib/ferrum/browser/process.rb,
lib/ferrum/page/screenshot.rb,
lib/ferrum/browser/subscriber.rb,
lib/ferrum/browser/web_socket.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, Cookies, DeadBrowserError, EmptyTargetsError, Error, Headers, JavaScriptError, Keyboard, ModalNotFoundError, Mouse, NoExecutionContextError, NoSuchWindowError, Node, NodeNotFoundError, NotImplementedError, Page, ScriptTimeoutError, StatusError, Targets, TimeoutError
Constant Summary collapse
- VERSION =
"0.2.1"
Class Method Summary collapse
Class Method Details
.mac? ⇒ Boolean
88 89 90 |
# File 'lib/ferrum.rb', line 88 def mac? RbConfig::CONFIG["host_os"] =~ /darwin/ end |
.mri? ⇒ Boolean
92 93 94 |
# File 'lib/ferrum.rb', line 92 def mri? defined?(RUBY_ENGINE) && RUBY_ENGINE == "ruby" end |
.windows? ⇒ Boolean
84 85 86 |
# File 'lib/ferrum.rb', line 84 def windows? RbConfig::CONFIG["host_os"] =~ /mingw|mswin|cygwin/ end |
.with_attempts(errors:, max:, wait:) ⇒ Object
96 97 98 99 100 101 102 103 104 |
# File 'lib/ferrum.rb', line 96 def with_attempts(errors:, max:, wait:) attempts ||= 1 yield rescue *Array(errors) raise if attempts >= max attempts += 1 sleep(wait) retry end |