1

I am struggling to find a tool that can test the chrome extension.

For example:

  1. Install this extension https://chrome.google.com/webstore/detail/colorpick-eyedropper/ohcpnigalekghcmgcdcenkpelffpdolg
  2. Once installed in Chrome mouse click on it.
  3. Hover over an element
  4. Note down element's color
  5. Compare whether the color captured by the extension is correct or not

Which tools can perform this task? Any non-coding tool will be preferred.

Please suggest.

1

2 Answers 2

1

Chrome extensions are HTML/CSS/JS based applications. You can test them with Selenium, the steps look something like this:

  • Build the extension to yourdir
  • Start browser and load extension with the argument load-extension=
  • Open url chrome://extensions/
  • Find the ID of extension under test
  • Open url chrome-extension://ID/options.html to test/configure the option screen
  • Open url chrome-extension://ID/popup.html to test/configure the popup when you click on the icon in the extension bar top right
  • Now use the browser with Selenium and verify the extensions behaviour

My personal open source chrome extension Stoppable has some example tests in JavaScript, they configure the options, use the popup and do something on a website to verify the extension is working.

I must say I havent released and run the test for years. The Chrome internal pages and locations tend to change. So you might need to adapt it to the latest version of Chrome. A process I had to go through a couple of times already.

0

I would suggest you to use Selenium. Since it is an open-source tool, you’ll even find some assistance to work on the process.

Meanwhile, there is this guide by Browserstack that you might find helpful on your way to test extensions.

https://www.browserstack.com/guide/test-chrome-extensions-in-selenium

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.