Class: Selenium::WebDriver::IE::InProcessServer Private
- Inherits:
-
Object
- Object
- Selenium::WebDriver::IE::InProcessServer
- Extended by:
- FFI::Library
- Defined in:
- lib/selenium/webdriver/ie/in_process_server.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#initialize ⇒ InProcessServer
constructor
private
A new instance of InProcessServer.
- #port ⇒ Object private
- #running? ⇒ Boolean private
-
#start(start_port, timeout) ⇒ Object
private
Starts the server, communicating on the specified port, if it is not already running.
- #stop ⇒ Object private
- #uri ⇒ Object private
Constructor Details
#initialize ⇒ InProcessServer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of InProcessServer.
26 27 28 |
# File 'lib/selenium/webdriver/ie/in_process_server.rb', line 26 def initialize @handle = nil end |
Instance Method Details
#port ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
55 56 57 |
# File 'lib/selenium/webdriver/ie/in_process_server.rb', line 55 def port self.class.current_port end |
#running? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
51 52 53 |
# File 'lib/selenium/webdriver/ie/in_process_server.rb', line 51 def running? self.class.is_running end |
#start(start_port, timeout) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Starts the server, communicating on the specified port, if it is not already running
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/selenium/webdriver/ie/in_process_server.rb', line 34 def start(start_port, timeout) return port if running? @handle = self.class.start_server(start_port) unless SocketPoller.new(Platform.localhost, start_port, timeout).connected? raise Error::WebDriverError, "unable to connect to IE server within #{timeout} seconds" end start_port end |
#stop ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 48 49 |
# File 'lib/selenium/webdriver/ie/in_process_server.rb', line 45 def stop return if session_count != 0 || @handle.nil? self.class.stop_server @handle @handle = nil end |