question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chromedriver auto download switches around key and value in the mapping file

See original GitHub issue

The problem

I am using the appiumDriverLocalService with the auto chromedriver autodownload argument AppiumDriverLocalService service = AppiumDriverLocalService.buildService(new AppiumServiceBuilder().usingAnyFreePort().withArgument(() -> "--allow-insecure","chromedriver_autodownload"));

With the capability “chromedriverChromeMappingFile” defined, this should fill up the mapping file with the required versions and automatically download any required versions to execute the tests.

The issue: it fills up the mapping file but switches around keys and values so when the chromedriver goes to look for the correct driver file to use it cannot find a suitable version.

Manually switching key and value makes the test execute so i’m sure this is the issue.

Environment

  • Appium version (or git revision) that exhibits the issue: v1.16.0
  • Last Appium version that did not exhibit the issue (if applicable):
  • Desktop OS/version used to run Appium: Windows
  • Node.js version (unless using Appium.app|exe): v8.11.4
  • Npm or Yarn package manager: npm
  • Mobile platform/version under test: Android (hybrid app)
  • Real device or emulator/simulator: real device
  • Appium CLI or Appium.app|exe: not sure, using AppiumDriverLocalService included in Appium dependency 7.3.0 on Maven Central

used desiredCapabilities: {"desiredCapabilities":{"appActivity":"","appPackage":"","chromedriverChromeMappingFile":"C:\\projects\\doccle-qa\\testautomation\\src\\test\\resources\\Doccle\\utilities\\chromedriver\\chromedriverChromeMappingFile","newCommandTimeout":300,"platformName":"Android","deviceName":"*","platform":"ANDROID"},"capabilities":{"firstMatch":[{"appium:appActivity":"","appium:appPackage":"","appium:chromedriverChromeMappingFile":"C:\\projects\\censored\\testautomation\\src\\test\\resources\\censored\\utilities\\chromedriver\\chromedriverChromeMappingFile","appium:deviceName":"*","appium:newCommandTimeout":300,"platform":"ANDROID","platformName":"android"}]}}

chromedriverChromeMappingFile: { “79.0.3945.16”: “79”, “79.0.3945.36”: “79” }

should be:

{ “79”: “79.0.3945.16”, “79”: “79.0.3945.36” }

Link to Appium logs

https://gist.github.com/aberx1/fe313617dbdf0a9254fe51bb01e0614c

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
mykola-mokhnachcommented, Feb 4, 2020

The patch has been published to appium@beta

0reactions
mykola-mokhnachcommented, Feb 4, 2020

Also regarding the format of the mapping file: its keys should be valid chromedriver version strings. Exact match is applied here. Values are the minimum chrome browser version numbers supported by corresponding chromedrivers. These values can also consist of single numbers, because we only consider the major browser version for matching. Invalid/non parseable values are skipped in the matching procedure.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WebDriver for Chrome - Capabilities & ChromeOptions
Capabilities are options that you can use to customize and configure a ChromeDriver session. This page documents all ChromeDriver supported capabilities and ...
Read more >
Downloading with chrome headless and selenium
Save this question. Show activity on this post. I'm using python-selenium and Chrome 59 and trying to automate a simple download sequence.
Read more >
Using Chromedriver - Appium
The script will automatically search for the newest chromedriver version that supports the given browser/web view, download it (the hash sum is verified...
Read more >
ChromeDriver Selenium Tutorial - Software Testing Help
In-Depth Tutorial On ChromeDriver for Running Selenium Webdriver Tests on Chrome Browser: Handling browser alerts while automating through ...
Read more >
List of Chromium Command Line Switches - Peter Beverloo
This is because someone testing manually might want to pass additional keys via the command line to a real Chrome release with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found