Exception: Ferrum::NoWebSocketUrlError
- Defined in:
- lib/ferrum/errors.rb,
sig/ferrum/errors.rbs
Overview
Raised when connecting to an already running browser, but its
/json/version endpoint doesn't answer with the websocket url.
Instance Attribute Summary collapse
-
#status ⇒ String?
readonly
Returns the value of attribute status.
-
#url ⇒ String
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, status = nil) ⇒ NoWebSocketUrlError
constructor
A new instance of NoWebSocketUrlError.
Constructor Details
#initialize(url, status = nil) ⇒ NoWebSocketUrlError
Returns a new instance of NoWebSocketUrlError.
182 183 184 185 186 187 188 |
# File 'lib/ferrum/errors.rb', line 182 def initialize(url, status = nil) @url = url @status = status reason = status ? "answered #{status}" : "didn't answer with JSON" super("Couldn't get a websocket url out of #{url}, `/json/version` there #{reason}. " \ "Check the browser is reachable at that url and that any credentials it needs are part of it") end |
Instance Attribute Details
#status ⇒ String? (readonly)
Returns the value of attribute status.
180 181 182 |
# File 'lib/ferrum/errors.rb', line 180 def status @status end |
#url ⇒ String (readonly)
Returns the value of attribute url.
180 181 182 |
# File 'lib/ferrum/errors.rb', line 180 def url @url end |