Class: Capybara::Apparition::Browser::Launcher::Remote
- Inherits:
-
Object
- Object
- Capybara::Apparition::Browser::Launcher::Remote
- Defined in:
- lib/capybara/apparition/browser/launcher/remote.rb
Instance Attribute Summary collapse
-
#ws_url ⇒ Object
readonly
Returns the value of attribute ws_url.
Class Method Summary collapse
Instance Method Summary collapse
- #host ⇒ Object
-
#initialize(options) ⇒ Remote
constructor
A new instance of Remote.
- #port ⇒ Object
- #restart ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(options) ⇒ Remote
Returns a new instance of Remote.
16 17 18 19 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 16 def initialize() @remote_host = .fetch('remote-debugging-address', '127.0.0.1') @remote_port = .fetch('remote-debugging-port', '9222') end |
Instance Attribute Details
#ws_url ⇒ Object (readonly)
Returns the value of attribute ws_url.
10 11 12 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 10 def ws_url @ws_url end |
Class Method Details
.start(options) ⇒ Object
12 13 14 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 12 def self.start() new().tap(&:start) end |
Instance Method Details
#host ⇒ Object
35 36 37 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 35 def host ws_url.host end |
#port ⇒ Object
39 40 41 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 39 def port ws_url.port end |
#restart ⇒ Object
31 32 33 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 31 def restart # Remote instance cannot be restarted end |
#start ⇒ Object
21 22 23 24 25 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 21 def start @ws_url = Addressable::URI.parse(get_ws_url(@remote_host, @remote_port)) true end |
#stop ⇒ Object
27 28 29 |
# File 'lib/capybara/apparition/browser/launcher/remote.rb', line 27 def stop # Remote instance cannot be stopped end |