I am running tests parallel with parallel_tests gem and so far all things are good and successfully able to incorporate in cloud environemnt also. But in some cases, our tests have quite and re-open browser. It is like @driver.quit which kills browser and chromedriver also and then browser is re-launched with new chrome session.
At this stage i don't have any chrome browser or chromedriver session running. So when relaunched with new driver session, sometimes it is starting on 9515 and sometimes on 9516.
9515 port is always opened and when it launches driver on 9515 there is no issue and test is passing successfully, but when driver session launched on 9516. It is saying unable to establish connection and tests are failing.
Not sure if parallel_tests taking ports randomly or chromedriver issues. Any help is appreciated? & has anyone faced this sort of issues?
i am using parallel_tests 2.27.1
chrome version 68(tried on 73 also)
When I posted this question to parallel_tests project in git hub, he suggested to configure multiple capybara server ports in the project. Find the link below:
https://github.com/grosser/parallel_tests/issues/691
I have tried to configure in spec_helper.rb while registering the driver as below but no luck.
if @browser == 'chrome' || @browser == "ch" || @browser == 'default'
Capybara.configure do |config|
config.server_port = 9887 + ENV['TEST_ENV_NUMBER'].to_i
end
Capybara.register_driver :selenium do |app|
profile = Selenium::WebDriver::Chrome::Profile.new
profile['extensions.password_manager_enabled'] = false
caps = Selenium::WebDriver::Remote::Capabilities.chrome(
"chromeOptions" =>
{
"args" => [ "--start-maximized", "--test-type", "--disable-popup-blocking", "--disable-infobars" ],
"prefs" => { "profile.managed_default_content_settings.geolocation" => 1, "profile.password_manager_enabled" => false, "credentials_enable_service" => false }
}
)
@driver = Capybara::Selenium::Driver.new(app, {:browser => :chrome, :desired_capabilities => caps, :http_client => client})
x = 0
Capybara.configure do |config|
x += 1
config.server_port = 9887 + x
end
--
You received this message because you are subscribed to the Google Groups "ChromeDriver Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromedriver-us...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.