The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to fix 'unable to connect to chromedriver'

Krzysztof Pastorczyk
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 16, 2019

I create one capybara test. It works on local machine but at bitbucket pipeline not.

I set port

Capybara.server_port = 9516

but then the capybara test tries to connect to host with port 9516. 

```

1) Visit back office The admin can sign in Failure/Error: visit(back_office_path) Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver 127.0.0.1:9516 # ./spec/features/home_spec.rb:8:in `block (3 levels) in <top (required)>

```

Gemfile:

gem 'capybara', '~> 3.14.0'
gem 'selenium-webdriver', '~> 3.14.1'
gem 'webdrivers', '~> 3.0'

 

spec_helper.rb

require 'capybara/rspec'
require 'selenium/webdriver'
require 'webdrivers'

Capybara.register_driver(:headless_chrome) do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: { args: %w[headless disable-gpu] }
)

Capybara::Selenium::Driver.new(
app,
browser: :chrome,
desired_capabilities: capabilities
)
end

Capybara.javascript_driver = :headless_chrome
Webdrivers::Chromedriver.required_version = '2.46'

 

Do you have some idea about how to solve it?

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events