class Selenium::WebDriver::Manager
Constants
- SECONDS_PER_DAY
Public Class Methods
new(bridge)
click to toggle source
@api private
# File lib/selenium/webdriver/common/manager.rb, line 27 def initialize(bridge) @bridge = bridge end
Public Instance Methods
timeouts()
click to toggle source
# File lib/selenium/webdriver/common/manager.rb, line 103 def timeouts @timeouts ||= Timeouts.new(@bridge) end
window()
click to toggle source
# File lib/selenium/webdriver/common/manager.rb, line 107 def window @window ||= Window.new(@bridge) end
Private Instance Methods
datetime_at(int)
click to toggle source
# File lib/selenium/webdriver/common/manager.rb, line 115 def datetime_at(int) DateTime.civil(1970) + (int / SECONDS_PER_DAY) end
seconds_from(obj)
click to toggle source
# File lib/selenium/webdriver/common/manager.rb, line 119 def seconds_from(obj) case obj when Time obj.to_f when DateTime (obj - DateTime.civil(1970)) * SECONDS_PER_DAY when Numeric obj else raise ArgumentError, "invalid value for expiration date: #{obj.inspect}" end end
strip_port(str)
click to toggle source
# File lib/selenium/webdriver/common/manager.rb, line 132 def strip_port(str) str.split(':', 2).first end