Is there a way to run gremlin.js Monkey Tests on third party URLs?

368 Views Asked by At

Is it possible to run Gremlin tests on third party URLs or external websites? For e.g. If I want to run gremlin on Twitter.com, what would I have to do? I've not tried it yet, but I'm thinking a framework like nightwatch.js might be handy, but I'm not sure about how to go about it.

2

There are 2 best solutions below

0
On BEST ANSWER

I realized since posting this question that like @ste_irl has answered, using gremlin as a bookmarklet is the answer for most sites. But one big if here is that if the site implements a content security policy on script-src, the bookmarklet wouldn't work.

To get around this, this is what I did: - Download Mozilla Developer Edition - Set security.csp.enable to false

This still doesn't work on Facebook, but works on inbox.google.com and most other websites

enter image description here

1
On

You can use it as a bookmark in your browser:

https://rawgit.com/marmelab/gremlins.js/master/bookmarklet.html

This will let you run it on any website.