ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

unrecognized chrome option: detach when connecting to embedded chromium #925

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I get unrecognized chrome option error when trying to connect to embedded 
chromiun by debuggerAddress chromeOption.

What steps will reproduce the problem?
1. caps = Selenium::WebDriver::Remote::Capabilities.chrome("chromeOptions" => 
{"debuggerAddress" => "127.0.0.1:20480"})

2. browser = Watir::Browser.new browser_type, :desired_capabilities => caps, 
:switches => ['--disable-extensions', 'test-type'] #, :service_log_path => 
'chromedriver.out'#  , :switches => %w[--incognito] 
#--user-data-dir=C:\\HOME\\GIT\\CUD --load-async]

Exception:
Selenium::WebDriver::Error::UnknownError: unknown error: cannot parse 
capability: chromeOptions
from unknown error: unrecognized chrome option: detach
  (Driver info: chromedriver=2.10.267521,platform=Windows NT 6.1 SP1 x86_64)

Selenium version:  gem 'selenium-webdriver', "~> 2.43.0"
OS: windows 7
Browser: embedded chromium 
Browser version: 25

I had to comment line 91 of 
C:/Ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.43.0/lib/selenium/webdrive
r/chrome/bridge.rb:
chrome_options['detach']                   = detach.nil? || !!detach

after commenting it connects to embedded chromium.

This issue is related to Issue 5591: ruby selenium-webdriver doesn't support 
chromedriver2: https://code.google.com/p/selenium/issues/detail?id=5591

But I use the latest selenium and chromedriver and if I don't use 
chromeOptions" => {"debuggerAddress" => "127.0.0.1:20480"} in capabilities it 
also works fine.

Original issue reported on code.google.com by yatsan...@gmail.com on 8 Oct 2014 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18