Skip to content
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

Non W3C Cap platformVersion is returned when a session is created #2023

Closed
diemol opened this issue May 30, 2022 · 3 comments
Closed

Non W3C Cap platformVersion is returned when a session is created #2023

diemol opened this issue May 30, 2022 · 3 comments

Comments

@diemol
Copy link

diemol commented May 30, 2022

System

  • Version: 0.31.0
  • Platform: macOS 12
  • Firefox:100.0.2
  • Selenium: 4.2.0 (Java)

When a session is created, GeckoDriver is adding to the response the cap platformVersion, which is not a W3C WebDriver capability. It should be prefixed with moz: or removed.

Testcase

    FirefoxOptions options = new FirefoxOptions();
    options.setCapability(CapabilityType.PLATFORM_NAME, Platform.ANY);
    options.setHeadless(false);
    options.addArguments("--start-maximized");
    options.setUnhandledPromptBehaviour(UnexpectedAlertBehaviour.ACCEPT_AND_NOTIFY);
    options.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
    options.setPageLoadStrategy(PageLoadStrategy.NORMAL); // https://www.skptricks.com/2018/08/timed-out-receiving-message-from-renderer-selenium.html
    options.setPageLoadTimeout(Duration.ofSeconds(30000));
    options.setScriptTimeout(Duration.ofSeconds(30000));
    return new FirefoxDriver(options);

Stacktrace

There is no stacktrace, but here is the response payload

{
  "value": {
    "sessionId": "e7f0db55-68d5-4f16-8f48-e8a568467579",
    "capabilities": {
      "acceptInsecureCerts": true,
      "browserName": "firefox",
      "browserVersion": "100.0.2",
      "moz:accessibilityChecks": false,
      "moz:buildID": "20220519220738",
      "moz:debuggerAddress": "localhost:55101",
      "moz:geckodriverVersion": "0.31.0",
      "moz:headless": false,
      "moz:processID": 30608,
      "moz:profile": "/var/folders/85/m0jdxw2j3yn9mrn_2dpnbsmm0000gn/T/rust_mozprofilejzNzai",
      "moz:shutdownTimeout": 60000,
      "moz:useNonSpecCompliantPointerOrigin": false,
      "moz:webdriverClick": true,
      "pageLoadStrategy": "normal",
      "platformName": "mac",
      "platformVersion": "21.5.0",
      "proxy": {},
      "setWindowRect": true,
      "strictFileInteractability": false,
      "timeouts": {
        "implicit": 0,
        "pageLoad": 30000000,
        "script": 30000000
      },
      "unhandledPromptBehavior": "accept and notify"
    }
  }

Trace-level log

@whimboo
Copy link
Collaborator

whimboo commented May 30, 2022

Thanks for this report! I filed as https://bugzilla.mozilla.org/show_bug.cgi?id=1771760.

@whimboo
Copy link
Collaborator

whimboo commented Jun 21, 2022

This will be fixed in the Firefox Nightly from today.

@whimboo whimboo closed this as completed Jun 21, 2022
@diemol
Copy link
Author

diemol commented Jun 21, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants