Appium-Chromedriver

Go back to tutorial

Appium-Chromedriver

appium-chromedriver

appium-chromedriver

Appium supports automating Android web pages in Chrome as well as for the built-in Browser. Also, Appium support the hybrid apps which are Chrome-backed. This is done by managing a Chromedriver instance and proxying commands to it when necessary. Further, it comes bundled with the latest version of Chromedriver, installed through the npm package appium-chromedriver (Github: appium-chromedriver).

But unfortunately, with each update to Chromedriver there is an increase in the minimum supported version of Chrome. Therefore, the older devices are often unable to be automate with the bundled version.Further, you can also configure Appium to use a particular Chromedriver version, either at install time, or by either passing the –chromedriver_version config property.

Also, a version can be specified at runtime, by specifying the –chromedriver-executable server flag, along with the full path to the Chromedriver executable which was manually downloaded.

How to automate discovery of compatible Chromedriver

From the Appium it has been always easy to pick the correct Chromedriver for the version of Chrome under test. Moreover, Appium only comes bundled with the Chromedriver most recently released at the time of the Appium version’s release. Further, more Chromedriver versions can be downloaded and either placed inside the Appium installation or in a custom location, indicated to Appium with the chromedriverExecutableDir desired capability. This capability is the absolute path to the directory in which you have placed one or more Chromedriver executables.

As well, since new versions of Chromedriver may be available that were not when an Appium version was released, a custom mapping of Chromedrivers to the minimum Chrome version they support can be given to Appium through the chromedriverChromeMappingFile desired capability. This should be the absolute path to a file with the mapping in it.

How to install network issues?

At the time of installation of Appium , it requires you to download Chromedriver. Therefore, there is a possibility that there could be network problems that make the install fail.

  • By default Chromedriver is retrieved from https://chromedriver.storage.googleapis.com/.
  • To use a mirror of the ChromeDriver binaries use npm config property chromedriver_cdnurl.
  • npm install appium-chromedriver –chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver

You may also add the property into your .npmrc file.

  • chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver

Another option is to use PATH variable CHROMEDRIVER_CDNURL.

  • CHROMEDRIVER_CDNURL=http://npm.taobao.org/mirrors/chromedriver npm install appium-chromedriver

Further, it may be required to adjust network proxy and firewall settings to allow the download to occur.

 

Enrich your profile and become Job Ready. Practice and Prepare for Mobile Testing (Appium) Exam Now!

Get expert advice and hundreds of Free Test – Try Mobile Testing (Appium) Practice Questions Now!

Go back to tutorial

Get industry recognized certification – Contact us

Menu