Skip to main content

Automated driver management for Selenium WebDriver

Abstract

Selenium WebDriver is a framework used to control web browsers automatically. It provides a cross-browser Application Programming Interface (API) for different languages (e.g., Java, Python, or JavaScript) that allows automatic navigation, user impersonation, and verification of web applications. Internally, Selenium WebDriver makes use of the native automation support of each browser. Hence, a platform-dependent binary file (the so-called driver) must be placed between the Selenium WebDriver script and the browser to support this native communication. The management (i.e., download, setup, and maintenance) of these drivers is cumbersome for practitioners. This paper provides a complete methodology to automate this management process. Particularly, we present WebDriverManager, the reference tool implementing this methodology. WebDriverManager provides different execution methods: as a Java dependency, as a Command-Line Interface (CLI) tool, as a server, as a Docker container, and as a Java agent. To provide empirical validation of the proposed approach, we surveyed the WebDriverManager users. The aim of this study is twofold. First, we assessed the extent to which WebDriverManager is adopted and used. Second, we evaluated the WebDriverManager API following Clarke’s usability dimensions. A total of 148 participants worldwide completed this survey in 2020. The results show a remarkable assessment of the automation capabilities and API usability of WebDriverManager by Java users, but a scarce adoption for other languages.

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Listing 1
Fig. 3
Fig. 4
Fig. 5
Listing 2
Fig. 6
Listing 3
Listing 4
Listing 5
Listing 6
Listing 7
Listing 8
Listing 9
Listing 10
Listing 11
Listing 12
Listing 13
Listing 14
Listing 15
Listing 16
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19

Notes

  1. 1.

    https://www.selenium.dev/

  2. 2.

    https://chromedriver.chromium.org/

  3. 3.

    https://github.com/mozilla/geckodriver/

  4. 4.

    https://chromedevtools.github.io/devtools-protocol/

  5. 5.

    https://firefox-source-docs.mozilla.org/testing/marionette/

  6. 6.

    https://www.selenium.dev/documentation/en/webdriver/driver_requirements/

  7. 7.

    https://chromedriver.chromium.org/downloads

  8. 8.

    https://trends.google.com/trends/explore?date=2019-01-01%202020-12-31&q=this%20version%20of%20chromedriver%20only%20supports%20Chrome%20version

  9. 9.

    https://stackoverflow.com/search?q=this+version+of+chromedriver+only+supports+Chrome+version

  10. 10.

    https://chromedriver.storage.googleapis.com/LATEST_RELEASE

  11. 11.

    https://chromedriver.storage.googleapis.com/LATEST_RELEASE_80

  12. 12.

    https://www.apache.org/licenses/LICENSE-2.0

  13. 13.

    https://github.com/bonigarcia/webdrivermanager

  14. 14.

    https://raw.githubusercontent.com/bonigarcia/webdrivermanager/master/src/main/resources/versions.properties

  15. 15.

    https://raw.githubusercontent.com/bonigarcia/webdrivermanager/master/src/main/resources/commands.properties

  16. 16.

    https://search.maven.org/artifact/io.github.bonigarcia/webdrivermanager

  17. 17.

    https://github.com/bonigarcia/webdrivermanager/releases

  18. 18.

    https://hub.docker.com/repository/docker/bonigarcia/webdrivermanager

  19. 19.

    https://github.com/bonigarcia/wdm-agent-example

  20. 20.

    https://appium.io/

  21. 21.

    https://www.selenium.dev/documentation/en/grid/

  22. 22.

    https://www.jamovi.org/

  23. 23.

    https://oss.sonatype.org/

  24. 24.

    https://github.com/bonigarcia/webdrivermanager/network/dependents

  25. 25.

    https://mvnrepository.com/artifact/io.github.bonigarcia/webdrivermanager

  26. 26.

    https://selenide.org/

  27. 27.

    https://serenity-bdd.info/

  28. 28.

    https://javalin.io/

  29. 29.

    https://www.npmjs.com/package/webdriver-manager

  30. 30.

    https://pypi.org/project/webdriver-manager/

  31. 31.

    https://github.com/titusfortner/webdrivers

  32. 32.

    https://github.com/rosolko/WebDriverManager.Net

  33. 33.

    https://npm.taobao.org/mirrors/

References

  1. Afonso LM, Cerqueira RFG, de Souza CS (2012) Evaluating application programming interfaces as communication artefacts. System 100:8–31

    Google Scholar 

  2. Alégroth E, Feldt R, Kolström P (2016) Maintenance of automated test suites in industry: An empirical study on visual gui testing. Inf Softw Technol 73:66–80

    Article  Google Scholar 

  3. Avasarala S (2014) Selenium webdriver practical guide. Packt Publishing Ltd

  4. Belmont J-M (2018) Hands-on continuous integration and delivery: Build and release quality software at scale with jenkins, travis ci, and circleci. Packt Publishing Ltd

  5. Bertoa MF, Troya JM, Vallecillo A (2006) Measuring the usability of software components. J Syst Softw 79(3):427–439

    Article  Google Scholar 

  6. Binder W, Hulaas J, Moret P (2007) Advanced java bytecode instrumentation. In: Proceedings of the 5th international symposium on Principles and practice of programming in Java, pp 135–144

  7. Blackwell A F, Britton C, Cox A, Green Thomas RG, Gurr C, Kadoda G, Kutar MS, Loomes M, Nehaniv C L, Petre M et al (2001) Cognitive dimensions of notations: Design tools for cognitive technology. In: Cognitive Technology: Instruments of Mind. Springer,pp 325–341

  8. Bloch J (2006) How to design a good api and why it matters. In: Companion to the 21st ACM SIGPLAN symposium on Object-oriented programming systems, languages, and applications. ACM, pp 506–507

  9. Bonett D G, Wright T A (2015) Cronbach’s alpha reliability: Interval estimation, hypothesis testing, and sample size planning. J Organ Behav 36(1):3–15

    Article  Google Scholar 

  10. Bruns A, Kornstadt A, Wichmann D (2009) Web application tests with selenium. IEEE Softw 26(5):88–91

    Article  Google Scholar 

  11. Bures M, Filipsky M (2016) Smartdriver: Extension of selenium webdriver to create more efficient automated tests. In: 2016 6th International Conference on IT Convergence and Security (ICITCS). IEEE, pp 1–4

  12. Burns D (2010) Selenium 1.0 testing tools beginner’s guide. Packt Publishing Ltd

  13. Cato S (2011) Pareto principles, positive responsiveness, and majority decisions. Theory Decis 71(4):503–518

    MathSciNet  Article  Google Scholar 

  14. Cerioli M, Leotta M, Ricca F (2020) What 5 million job advertisements tell us about testing: a preliminary empirical investigation. In: Proceedings of the 35th Annual ACM Symposium on Applied Computing, pp 1586–1594

  15. Chaulagain R S, Pandey S, Basnet S R, Shakya S (2017) Cloud based web scraping for big data applications. In: 2017 IEEE International Conference on Smart Cloud (SmartCloud). IEEE, pp 138–143

  16. Clarke S (2004) Measuring api usability. Dr. Dobb’s Journal Windows, pp S6–S9

  17. Clarke S (2005) Describing and measuring api usability with the cognitive dimensions. In: Cognitive Dimensions of Notations 10th Anniversary Workshop. Citeseer, pp 131

  18. Cleve H, Zeller A (2005) Locating causes of program failures. In: Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005. IEEE, pp 342–351

  19. Cortina J M (1993) What is coefficient alpha? an examination of theory and applications. J Appl Psychol 78(1):98

    Article  Google Scholar 

  20. Croasmun J T, Ostrom L (2011) Using likert-type scales in the social sciences. J Adult Educ 40(1):19–22

    Google Scholar 

  21. Daughtry III, J M, Carroll J M (2012) Perceived self-efficacy and apis. Program Interest Group:42

  22. Downing S M (2003) Validity: on the meaningful interpretation of assessment data. Med Educ 37(9):830–837

    Article  Google Scholar 

  23. Dustin E, Garrett T, Gauf B (2009) Implementing automated software testing: How to save time and lower costs while raising quality. Pearson Education

  24. Dustin E, Rashka J, Paul J (1999) Automated software testing: Introduction, management, and performance: Introduction, management, and performance. Addison-Wesley Professional

  25. Ellis B, Stylos J, Myers B (2007) The factory pattern in api design: A usability evaluation. In: Proceedings of the 29th international conference on Software Engineering. IEEE Computer Society, pp 302–312

  26. Farooq U, Zirkler D (2010) Api peer reviews: a method for evaluating usability of application programming interfaces. In: Proceedings of the 2010 ACM conference on Computer supported cooperative work. ACM, pp 207–210

  27. Freeman E, Robson E, Bates B, Sierra K (2008) Head first design patterns. O’Reilly Media, Inc.

  28. García B (2017) Mastering software testing with junit 5: Comprehensive guide to develop high quality java applications. Packt Publishing Ltd

  29. García B, López-Fernández L, Gortázar F, Gallego M (2019) Practical evaluation of vmaf perceptual video quality for webrtc applications. Electronics 8(8):854

    Article  Google Scholar 

  30. García B, Gallego M, Gortázar F, Munoz-Organero M (2020a) A survey of the selenium ecosystem. Electronics 9(7):1067

    Article  Google Scholar 

  31. García B, Gortázar F, Gallego M, Hines A (2020b) Assessment of qoe for video and audio in webrtc applications using full-reference models. Electronics 9(3):462

    Article  Google Scholar 

  32. Gojare S, Joshi R, Gaigaware D (2015) Analysis and design of selenium webdriver automation testing framework. Procedia Comput Sci 50:341–346

    Article  Google Scholar 

  33. Green TRG (1989) Cognitive dimensions of notations. People Comput V:443–460

  34. Gundecha U, Avasarala S (2018) Selenium webdriver 3 practical guide: End-to-end automation testing for web and mobile browsers with selenium webdriver. Packt Publishing Ltd

  35. Hassan F, Mostafa S, Lam ESL, Wang X (2017) Automatic building of java projects in software repositories: A study on feasibility and challenges. In: 2017 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM). IEEE, pp 38–47

  36. Henning M (2007) Api design matters. Queue 5(4):24–36

    Article  Google Scholar 

  37. Hovemeyer D (2005) Simple and effective static analysis to find bugs. Ph.D. Thesis, University of Maryland

  38. Islam MN, Quadri SMK (2020) Framework for automation of cloud-application testing using selenium (facts). Adv Sci Technol Eng Syst J 5(1):226–232

    Article  Google Scholar 

  39. Kurose J, Ross K (2010) Computer networks: A top down approach featuring the internet. Peorsoim Addison Wesley

  40. Leotta M, Clerissi D, Ricca F, Spadaro C (2013a) Comparing the maintainability of selenium webdriver test suites employing different locators: A case study. In: Proceedings of the 2013 international workshop on joining academia and industry contributions to testing automation, pp 53–58

  41. Leotta M, Clerissi D, Ricca F, Spadaro C (2013b) Improving test suites maintainability with the page object pattern: An industrial case study. In: 2013 IEEE Sixth International Conference on Software Testing, Verification and Validation Workshops. IEEE, pp 108–113

  42. López-Fernández L, García B, Gallego M, Gortázar F (2017) Designing and evaluating the usability of an api for real-time multimedia services in the internet. Multimed Tools Appl 76(12):14247–14304

    Article  Google Scholar 

  43. Memon AM, Cohen MB (2013) Automated testing of gui applications: models, tools, and controlling flakiness. In: 2013 35th International Conference on Software Engineering (ICSE). IEEE, pp 1479–1480

  44. Moody DL (2009) The physics of notations: toward a scientific basis for constructing visual notations in software engineering. IEEE Trans Softw Eng 35 (6):756–779

    Article  Google Scholar 

  45. Peng H, Wang Y (2010) Wmic-based technology server network management software design. In: 2010 Second Pacific-Asia Conference on Circuits, Communications and System, vol 1. IEEE, pp 253–256

  46. Piccioni M, Furia CA, Meyer B (2013) An empirical study of api usability. In: 2013 ACM/IEEE International Symposium on Empirical Software Engineering and Measurement. IEEE, pp 5–14

  47. Presler-Marshall K, Horton E, Heckman S, Stolee K (2019) Wait, wait. no, tell me. analyzing selenium configuration effects on test flakiness. In: 2019 IEEE/ACM 14th International Workshop on Automation of Software Test (AST). IEEE, pp 7–13

  48. Rafi DM, Moses KRK, Petersen K, Mäntylä MV (2012) Benefits and limitations of automated software testing: Systematic literature review and practitioner survey. In: 2012 7th International Workshop on Automation of Software Test (AST). IEEE, pp 36–42

  49. Ramler R, Wolfmaier K (2006) Economic perspectives in test automation: balancing automated and manual testing with opportunity cost. In: Proceedings of the 2006 international workshop on Automation of software test, pp 85–91

  50. Reddy M (2011) Api design for c++. Elsevier

  51. Reja U, Manfreda KL, Hlebec V, Vehovar V (2003) Open-ended vs. close-ended questions in web questionnaires. Dev Appl Stat 19(1):159–177

    Google Scholar 

  52. Sazoglu FB, Cambazoglu BB, Ozcan R, Altingovde IS, Ulusoy O (2013) Strategies for setting time-to-live values in result caches. In: Proceedings of the 22nd ACM international conference on Information & Knowledge Management, pp 1881–1884

  53. Stewart S, Burns D (2020) WebDriver, W3C Working Draft

  54. Stocco A, Leotta M, Ricca F, Tonella P (2015) Why creating web page objects manually if it can be done automatically? In: 2015 IEEE/ACM 10th International Workshop on Automation of Software Test. IEEE, pp 70–74

  55. Stocco A, Leotta M, Ricca F, Tonella P (2017) Apogen: automatic page object generator for web testing. Softw Qual J 25(3):1007–1039

    Article  Google Scholar 

  56. Trizano-Hermosilla I, Alvarado J M (2016) Best alternatives to cronbach’s alpha reliability in realistic conditions: congeneric and asymmetrical measurements. Front Psychol 7:769

    Article  Google Scholar 

  57. Vila E, Novakova G, Todorova D (2017) Automation testing framework for web applications with selenium webdriver: Opportunities and threats. In: Proceedings of the International Conference on Advances in Image Processing, pp 144–150

  58. Wagner B (2010) Effective c# (covers c# 4.0): 50 specific ways to improve your c. pearson education

  59. Wilkinson L (2006) Revising the pareto chart. Amer Stat 60 (4):332–334

    MathSciNet  Article  Google Scholar 

  60. Yang Y, Green SB (2011) Coefficient alpha: A reliability coefficient for the 21st century?. J Psychoeduc Assess 29(4):377–392

    Article  Google Scholar 

Download references

Acknowledgements

This work has been been supported in part by the “Análisis en tiempo Real de sensores sociALes y EStimación de recursos para transporte multimodal basada en aprendizaje profundo” project (MaGIST-RALES), funded by the Spanish Agencia Estatal de Investigación (AEI, doi 10.13039/501100011033) under grant PID2019-105221RB-C44. This work also received partial support from FEDER/Ministerio de Ciencia, Innovación y Universidades - Agencia Estatal de Investigación through project Smartlet (TIN2017-85179-C3-1-R), and from the eMadrid Network, which is funded by the Madrid Regional Government (Comunidad de Madrid) with grant No. S2018/TCS-4307.

Author information

Affiliations

Authors

Corresponding author

Correspondence to Boni García.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Communicated by: Shin Yoo

Appendix A: WebDriverManager API

Appendix A: WebDriverManager API

The following table summarizes the complete WebDriverManager Java API together with the equivalent configuration key. Footnote 33

Method Description Configuration key
driverVersion (String) Particular driver version wdm.chromeDriverVersion, wdm.operaDriverVersion, wdm.edgeDriverVersion, wdm.phantomjsDriverVersion, wdm.geckoDriverVersion, wdm.chromiumDriverVersion, wdm.internetExplorerDriverVersion
browserVersion (String) Particular browser version wdm.chromeVersion, wdm.operaVersion, wdm.edgeVersion, wdm.firefoxVersion, wdm.chromiumVersion
cachePath(String) Driver cache path wdm.cachePath
resolution- CachePath(String) Resolution cache path wdm.resolutionCachePath
forceDownload() Force downloading the driver (even if it is already available in the driver cache) wdm.forceDownload
useBetaVersions() Download also beta versions wdm.useBetaVersions
architecture(Arch) Force using a given architecture (i.e., 32-bit or 64-bit) wdm.architecture
arch32() Force using 32-bit architecture wdm.architecture=32
arch64() Force using 64-bit architecture wdm.architecture=64
operatingSystem(OS) Force using a given operating system (WIN, MAC, or LINUX) wdm.os
win() Force using Windows as operating system wdm.os=WIN
linux() Force using Linux as operating system wdm.os=LINUX
mac() Force using Mac OS as operating system wdm.os=MAC
ignoreVersions (String...) Ignore some driver versions wdm.ignoreVersions
useMirror() Use driver repository mirror. Available for chromedriver, geckodriver, operadriver, and phantomjs wdm.useMirror
driverRepositoryUrl(URL) URL of the driver repositories wdm.chromeDriverUrl, wdm.operaDriverUrl, wdm.edgeDriverUrl, wdm.phantomjsDriverUrl, wdm.geckoDriverUrl, wdm.internetExplorerDriverUrl,
proxy(String) Use an HTTP proxy for the Internet connection (notation my.http.proxy:1234 or username:password@my. http.proxy:1234) wdm.proxy
proxyUser(String) Username for the HTTP proxy wdm.proxyUser
proxyPass(String) Password for HTTP proxy wdm.proxyPass
localRepository User(String) Username for a local repository wdm.proxyUser
localRepository Password(String) Password for a local repository wdm.proxyPass
gitHubToken Name(String) Token name for authenticated requests in GitHub wdm.gitHubTokenName
gitHubToken Secret(String) Secret for authenticated requests in GitHub wdm.gitHubTokenSecret
timeout(int) Timeout (in seconds) to connect and download drivers from repositories wdm.timeout
properties(String) Properties file for internal configuration values wdm.properties
avoidExport() Avoid exporting JVM properties with the driver path (used by default in CLI) wdm.avoidExport
avoidOutputTree() Avoid creating tree structure in driver cache (used by default in CLI) wdm.avoidOutputTree
avoidFallback() Disable the fallback mechanism in the resolution algorithm wdm.avoidFallback
avoidBrowser Detection() Disable the dynamic browser version detection mechanism wdm.avoidBrowserDetection
avoidReadRelease FromRepository() Disable checking LATEST_RELEASE info from repositories (for Chrome and Edge) wdm.avoid ReadRelease FromRepository
browserVersionDetectionCommand(String) Custom command for browser version detection wdm.browserVersionDetectionCommand
browserVersionDetectionRegex(String) Regular expression used to extract browser version wdm.browserVersionDetectionRegex
ttl(int) TTL (in seconds) for driver versions in the resolution cache wdm.ttl
ttlBrowsers(int) TTL (in seconds) for browser versions in the resolution cache wdm.ttlForBrowsers
useLocalVersionsPropertiesFirst() Disable the usage of the online versions database (use the local copy instead) wdm.versionsPropertiesOnlineFirst
useLocalCommandsPropertiesFirst() Disable the usage of the online commands database (use the local copy instead) wdm.commandsPropertiesOnlineFirst
versionsPropertiesUrl(URL) URL of the the online versions database (version.properties) wdm.versionsPropertiesUrl
commandsPropertiesUrl(URL) URL of the the online commands database (commands.properties) wdm.commandsPropertiesUrl
clearResolutionCache() Remove resolution cache (browser and driver versions previously resolved) wdm.clearResolutionCache
clearDriverCache() Remove driver cache (drivers previously resolved) wdm.clearDriverCache
exportParameter(String) Java property name used to export the driver path (e.g., webdriver. chrome.driver for Chrome or webdriver.gecko. driver for Firefox) wdm.chromeDriverExport, wdm.geckoDriverExport, wdm.edgeDriverExport, wdm.operaDriverExport, wdm.phantomjsDriverExport, wdm.internetExplorerDriverExport

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

García, B., Munoz-Organero, M., Alario-Hoyos, C. et al. Automated driver management for Selenium WebDriver. Empir Software Eng 26, 107 (2021). https://doi.org/10.1007/s10664-021-09975-3

Download citation

Keywords

  • Test automation
  • Testing tools
  • Selenium WebDriver