Skip to content

Testing greasemonkey/tampermonkey userscripts #28107

Answered by pke
pke asked this question in Questions and Help
Discussion options

You must be logged in to vote

I have found a working solid solution. With a little bit of metadata the userscript can work as a browser extension.

{
  "manifest_version": 3,
  "name": "my userscript",
  "version": "1.0",
  "content_scripts": [
    {
      "js": ["my.userscript.js"],
      "matches": [
        "https://www.amazon.com/*"
      ]
    }
  ]
}

Then loading this in the cypress plugin.js

/// <reference types="cypress" />
// ***********************************************************
// This example plugins/index.js can be used to load plugins
//
// You can change the location of this file or turn off loading
// the plugins file with the 'pluginsFile' configuration option.
//
// You can read more here:
// htt…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@pke
Comment options

Comment options

You must be logged in to vote
2 replies
@simonasmulevicius-humbility
Comment options

@pke
Comment options

Answer selected by pke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants