Skip to content

Selenium standalone doesn't launch Chrome but a blank version of Firefox #5570

@Drillan767

Description

@Drillan767

Meta -

OS: Windows 8.1

Selenium Version: standalone-3.10.0

Browser: Chrome 64

I'm trying to run test from Behat with Selenium to test the JavaScript. I don't believe my error is linked to either ChromeDriver, but more about my configuration or my way to launch the selenium server. I just can't manage to make Selenium start a Chrome session and run the tests. I also asked on Stack Overflow but didn't have any luck so far.

Expected Behavior -

A new Chrome session starts, the tests are getting done, then Chrome stops.

Actual Behavior -

A new and blank Firefox window opens up. After 45s, the standalone server stops because nothing answered it. Chrome is never launched.

Steps to reproduce -

Here is my behat.yml file:

default:
  suites:
    default:
      contexts:
        - SpheriaContext
        - Drupal\DrupalExtension\Context\DrupalContext
        - Drupal\DrupalExtension\Context\MinkContext
  gherkin:
     cache: ~
  extensions:
    Behat\MinkExtension:
      base_url: http://www.spheria.int
      sessions:
        default:
          selenium2:
            browser: chrome
      browser_name: chrome
#        default:
#          goutte: ~
#        javascript:
#          selenium2:
#            browser: chrome
#            wd_host: 'http://localhost:4444/wd/hub'
    Drupal\DrupalExtension:
      blackbox: ~

Here is the test I want to run:

   @javascript
    Scenario: Modification d'un produit
        Given I am on the homepage
        And I am logged in with "administrator spheria"
        Then I should see "Tableau de bord"
        When I go to "/admin/view/produit"
        Then I should see "test produit"
        When I click "test produit"
        Then the url should match "/node/[0-9]+$"
        When I edit the entity I'm seeing
        Then the url should match "/node/[0-9]+/edit"
        When I fill in "Test produit - edited" for "title[0][value]"
        And I attach the file "spheria/features/files/progression.png" to "files[field_produit_image_0]"
        And I fill in "progression" for "field_produit_image[0][alt]"
        And I press "Enregistrer"
        Then the url should match "/node/[0-9]+$"
        And I should see "Test produit - edited"
        And I should see "Obsèques"
        And I should see 1 images
        And I should see "Ce produit est génial pour les clients post-mortem"

And here is how I launch the Selenium standalone server:

java -Dwebdriver.chrome.driver='./chromedriver.exe' -jar selenium-server-standalone-3.10.0.jar

The server gets started normally, and when I go to http://localhost:4444/wd/hub I can see a page where sessions should be listed, but it always remains empty.

Just in case, here is the Selenium trace when I try a test:

14:12:52.239 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.10.0', revision: '176b4a9'
14:12:52.239 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
2018-03-06 14:12:52.337:INFO::main: Logging initialized @365ms to org.seleniumhq.jetty9.util.log.StdErrLog
14:12:52.610 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
14:13:02.286 INFO [ActiveSessionFactory.apply] - Capabilities are: Capabilities {browser: firefox, browserName: chrome, ignoreZoomSetting: false, marionette: false, name: Behat feature suite, tags: [64006A38B5DE, PHP 7.0.10]}
14:13:02.286 INFO [ActiveSessionFactory.lambda$apply$11] - Matched factory org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.firefox.XpiDriverService)

Did I forget anything? Should I do in another way?

Thank you in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions