Automation Testing for chrome extensions

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

    For example:

    1. Install this extension
    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.

  • 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.

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2