-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selenium::WebDriver::Error::WebDriverError #658
Comments
have both of them added, same result
Only the first driver, browser starts. the seconds throws the invalid session id |
sorry, no idea .... if you find a solution please update the wiki page too
:)
…On Thu, Oct 11, 2018 at 12:54 AM sebyx07 ***@***.***> wrote:
have both of them added, same result
Capybara.default_driver = :chrome
Capybara.ignore_hidden_elements = false
port = 9887 + ENV['TEST_ENV_NUMBER'].to_i
Capybara.server_port = port
Capybara.session_name = port.to_s
Only the first driver, browser starts. the seconds throws the invalid
session id
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#658 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAsZ_EhJqbn-NkiRp2DTIeS9Dl1Xh1qks5ujvkmgaJpZM4XVE_T>
.
|
Hey, got something that works. had to also configure the driver port. Capybara.default_driver = :chrome
port = 9887 + ENV["TEST_ENV_NUMBER"].to_i
Capybara.server_port = port
Capybara.register_driver :chrome do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: {
args: %W(disable-dev-shm-usage disable-infobars disable-extensions no-sandbox headless disable-popup-blocking disable-gpu window-size=1280,1024)
}
)
Capybara::Selenium::Driver.new(app,
{
browser: :chrome,
desired_capabilities: capabilities,
driver_opts: {
port_server: 9515 + ENV["TEST_ENV_NUMBER"].to_i
}
}
)
end |
@sebyx07 i am currently attempting to do something very similar with my setup (using https://github.com/flavorjones/chromedriver-helper) require 'capybara/rails'
require 'capybara/rspec'
require 'capybara-screenshot/rspec'
Chromedriver::Helper.new.update
Capybara.server_host = "localhost"
test_run_int = (ENV["TEST_ENV_NUMBER"].try(:to_i) || 0)
port = 4000 + test_run_int
Capybara.server_port = port
Capybara.register_driver :headless_chrome do |app|
browser_options = ::Selenium::WebDriver::Chrome::Options.new()
browser_options.args << '--no-sandbox'
browser_options.args << '--window-size=1280,1024'
browser_options.args << '--disable-dev-shm-usage'
browser_options.headless!
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options, driver_opts: {
port_server: 9515 + test_run_int
})
end
Capybara::Screenshot.register_driver :headless_chrome do |driver, path|
driver.browser.save_screenshot(path)
end
Capybara.javascript_driver = :headless_chrome i just wanted to say that by adding leaving this here in case anyone else comes across this |
awesome, thx! :) |
Yes, I think in my original issue it was all using docker containers (running on some flavor of Linux) |
I'm moving an application to a Docker environment, so one of the first steps is running CI in a docker container. I was running into Adding Thanks a lot fellas! |
I've also added this
error trace
Is there a way to run the tests parallel?
The text was updated successfully, but these errors were encountered: