Class: ActionDispatch::SystemTesting::Driver
- Defined in:
- actionpack/lib/action_dispatch/system_testing/driver.rb
Overview
:nodoc:
Instance Attribute Summary collapse
- 
  
    
      #name  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute name. 
Instance Method Summary collapse
- 
  
    
      #initialize(driver_type, **options, &capabilities)  ⇒ Driver 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Driver. 
- #use ⇒ Object
Constructor Details
#initialize(driver_type, **options, &capabilities) ⇒ Driver
| 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | # File 'actionpack/lib/action_dispatch/system_testing/driver.rb', line 10 def initialize(driver_type, **, &capabilities) @driver_type = driver_type @screen_size = [:screen_size] @options = [:options] || {} @name = @options.delete(:name) || driver_type @capabilities = capabilities if driver_type == :selenium gem "selenium-webdriver", ">= 4.0.0" require "selenium/webdriver" @browser = Browser.new([:using]) @browser.preload unless @options[:browser] == :remote else @browser = nil end end | 
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
| 8 9 10 | # File 'actionpack/lib/action_dispatch/system_testing/driver.rb', line 8 def name @name end | 
Instance Method Details
#use ⇒ Object
| 27 28 29 30 31 | # File 'actionpack/lib/action_dispatch/system_testing/driver.rb', line 27 def use register if registerable? setup end |