In order to add a Chrome Extension to your Automation Session in Testsigma, we need to perform three simple steps:


1. Enable Developer Mode in Extensions page

2. Download the extension/s to the local device.

3. Specify the Extensions path in the Desired Capabilities.


1. Enable Developer Mode in Extensions page

Go to Extensions page in your Google Chrome browser and Enable Developer mode toggle button on the top right corner.




2. Download the extension/s to the local device.

Go to Google Chrome Store (https://chrome.google.com/webstore/category/extensions?hl=en-GB) and search for the extension you need. Let us try the Testsigma UI Recorder Extension as an example.



Copy the URL for the Extension as shown below:



Paste the URL in https://chrome-extension-downloader.com/ and click on Download Extension button to download the extension to your local machine. 





3. Specify the Extensions path in the Desired Capabilities

Add an Execution Configuration in Testsigma and add the following Desired Capability:


Name
Data Type
Value
goog:chromeOptions
String
{"extensions":["path/to/extension"]}



To add more than one extension, give the value in the format:

{"extensions":["path/to/extension1"],["path/to/extension2"]}


That's all we need to do in order to add an extension to an Automation Session in Testsigma using Desired Capabilities.


Once the execution starts, it will automatically take the file and install it to the Browser. To confirm whether the given extension is added or not, you can check the extension icon in the top right corner of the browser as shown in the below screenshot.



Extras


If we need to set all capabilities at a time, we can pass them in JSON format like given below:


{
    "args":["user-data-dir=/path/to/your/custom/profile","--disable-notifications"],
    "extensions":["Testsigma_v1.6.7.crx"],
    "pref":{"profile.default_content_settings.popups": 0},
    "mobileEmulation": {"deviceName":"Nexus 5"}
}