1

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.

nikjohn
  • 20,026
  • 14
  • 50
  • 86

2 Answers2

1

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.

irl_irl
  • 3,785
  • 9
  • 49
  • 60
  • Thank you for the answer. I came across this, but realized that it doesn't work on _all_ websites. If CSP (content security policy) is implemented, this script won't work. For e.g. Facebook, inbox etc. – nikjohn Nov 18 '16 at 06:31
0

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

nikjohn
  • 20,026
  • 14
  • 50
  • 86