How to test Chrome Extensions
Introduction
You can use Endtest to test Chrome Extensions.
Steps
- Your
Chrome Extensionmust be in aZIPfile. - Upload that
ZIPfile in our Drive section. - Copy the
File Download URLfor the uploadedZIPfile. - Go to the
Advanced Settingssection for your test suite. - Paste the
File Download URLin theAdd Chrome Extensioninput. - Click on the
Savebutton. - Execute the test suite in
Chrome.
The Chrome Extension will be automatically loaded in the Chrome browser once the test execution starts.
In order to access certain sections from the Chrome Extension, you might need to get the ID of that extension.
The ID will be unique for each test execution.
You can use an Execute JavaScript step to extract the ID from the URL for that Chrome Extension and store it inside a JavaScript variable.
After that, you can transfer the ID into an Endtest variable by using the Extract value from JS variable option from the Set Variable action.
This will allow you to join that Endtest variable with other strings and variables in the Go to URL steps in order to access certain sections from your Chrome Extension.
