我正在尝试使用(Ruby)和OS Windows 10中的以下代码加载firefox配置文件
profile = Selenium::WebDriver::Firefox::Profile.from_name 'default'
url="https://www.google.com"
driver = Selenium::WebDriver.for(:firefox,:marionette=>true ,:profile=> profile)
driver.get(url)
但我收到错误:
C:\Ruby22-x64\bin\ruby test2.rb
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver/remote/w3c_bridge.rb:81:in `initialize': unknown option: {:profile=>#<Selenium::WebDriver::Firefox::Profile:0x00000007810630 @model="C:\\Users\\USUARIO\\AppData\\Roaming\\Mozilla\\Firefox/Profiles/razhtav0.default", @native_events=true, @secure_ssl=false, @untrusted_issuer=true, @load_no_focus_lib=false, @additional_prefs={}, @extensions={}>} (ArgumentError)
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver- 2.53.4/lib/selenium/webdriver/firefox/w3c_bridge.rb:35:in `initialize'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver- 2.53.4/lib/selenium/webdriver/common/driver.rb:51:in `new'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver- 2.53.4/lib/selenium/webdriver/common/driver.rb:51:in `for'
from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.53.4/lib/selenium/webdriver.rb:84:in `for'
from test2.rb:25:in `<main>'
>Exit code: 1