Skip to content
Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time

extension icon Useful Snippets Extension

A Chrome Extension with Useful JavaScript snippets for testing.

Feel free to contribute to this set of snippets.

What we are looking for are short JavaScript snippets that can run from a popup menu and provide small useful aids to support testing.

The snippets should also be small enough that they provide useful examples of using JavaScript from the console or as Bookmarklets and help people learn to use JavaScript in their testing.

Basic Install Instructions

  • Download and extract this repository somewhere
  • Navigate to chrome://extensions within Chrome
  • Ensure to switch 'Developer mode' on (a toggle at the top right of the page)
  • Select 'Load unpacked' and then navigate to the /extension folder
  • Navigate to a website and then right click it to access the Useful Snippets context menu
  • After executing a snippet you can see the bot code and get the code as a bookmarklet by viewing the DevTools console

how to install extension

Current Snippets

Below is a list of snippets currently available with this extension. Have an idea? Want to contribute? Please feel free to fork this repository, add snippets and then create a pull request.


  • Remove images which do not have alt tags
  • Show images which do not have alt tags
  • Remove inputs which do not have matching for labels
  • Show inputs which do not have matching for labels
  • Remove elements with duplicate id's
  • Show elements with duplicate id's
  • Remove page style sheets
  • Visualise page tab flow


  • Insert JS Script Injection in all inputs
  • Insert SQL Injection in all inputs


  • Check label text overflow
  • Check button text overflow
  • Check link text overflow
  • Check page text overflow
  • Check all elements text overflow


  • Switch document edit mode on
  • Switch document edit mode off
  • Pretty print a JSON string
  • Encode a string as Base64
  • Decode a Base64 string
  • For Every element Do this
    • will prompt twice, first for a CSS selector, next for some javascript to execute against the element variable.
    • e.g. "p" and then "console.log(element.innerText)" would write out the text of all paragraphs to the console
    • e.g. "[role='checkbox']" and then "" would toggle all checkboxes
  • Link Checker
    • A simple link checker - all CORS and mixed content errors are displayed in console, console.table used for report output

Validation (Client side)

  • Remove max length attributes from fields
  • Remove required field attributes from fields
  • Remove paste restrictions from fields
  • Change all inputs types to text


See commit history for the authorship of the ongoing snippets.


A Chrome Extension with Useful JavaScript snippets for testing




No releases published


No packages published