Drive Chrome with Extensions using Selenium WebDriver

Launch Chrome browser with extensions in Selenium WebDriver scripts

Zhimin Zhan

--

This article is included in my “How to in Selenium WebDriver” series.

Software professionals often use Chrome extensions to assist in using the application. In rare cases, certain chrome extensions become an essential component of application testing infrastructure. Take a team that uses automation scripts for showcases as an example. After driving the application to a certain state, a business analyst may continue to use a Chrome extension (in the browser launched by selenium scripts) to demonstrate.

In the below case study, I will show a script that uses the TestWise Recorder extension to record user operations.

TestWise Recorder is an extension created by me, however, I rarely used it. (here is why?) I find it is usually more efficent to create high-qualty selenium scripts by hand. Hard to believe? See this article (with video demo). With a right tool and under correct guidance, learning to write automated test scripts in raw Selenium WebDriver is far eaiser than in other frameworks.

Raw Selenium WebDriver in Ruby binding, run from TestWise

A typical way of using a Chrome Extension consists of the following steps:

  • Download the Chrome Extension file

--

--