Skip to content

BrowserWebDriverContainer fails to determine Selenium version for Selenium v3.9.1 #611

@jvalloire

Description

@jvalloire

When starting a BrowserWebDriverContainer it tries to determine Selenium version from classpath, looking for the Manifest file from selenium-api.jar.

Using Selenium 3.9.1, the detection fails and it uses the default 2.45.0 version, thus pulling a selenium/standalone-chrome-debug:2.45.0 for Chrome.

Looking at the code of SeleniumUtils class, we can see that it reads Selenium-Version value of the Build-Info section in the Manifest file to infere the version to use.

That is ok in selenium-api-2.45.0.jar:

Manifest-Version: 1.0
Built-By: linman
Build-Jdk: 1.7.0_65
Created-By: Apache Maven 3.1.1
Archiver-Version: Plexus Archiver

Name: Build-Info
Selenium-Revision: 5017cb8e7ca8e37638dc3091b2440b90a1d8686f
Selenium-Version: 2.45.0
Selenium-Build-Time: 2015-02-27 09:10:26

But in selenium-api-3.9.1.jar, the format is not the same:

Manifest-Version: 1.0

Name: Build-Info
Build-Revision: 63f7b50
Build-Time: 2018-02-07T22:25:02.294Z
Build-User: shs

Name: Selenium
Selenium-Version: 3.9.1

Thus, reading Build-Info section, the Selenium-Version attribute can't be found.

However, looking at selenium-api-3.10.0 & selenium-api-3.11.0, the Selenium-Version is back in the Build-Info section... I didn't check all selenium-api version, but it looks like the format of the Manifest file is not really a standard.

To be more adaptable to format change, I think the code should check for the Selenium-Version entry in all the sections of the Manifest file and not only the Build-Info section, hoping we can at least rely on the fact the Selenium-Version will be present somewhere...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions