Browsers won't execute JavaScript

I've got the following macro who does the following:

  1. Executes a JavaScript on active browser who gets the current tab URL: window.location.href
  2. Uses this URL to open PageSpeed Insights

That's it. Works perfectly on Chrome, but no on Firefox or Safari.

Do I need to do something to run JavaScript on other browsers?
Is there a better approach to execute this?

Download: Analyze page no PageSpeed Insights.kmmacros (20.0 KB)

Only Chrome and Safari support JavaScript in Browser.

You can easily get web page info like URL and Title using the KM FrontBrowser tokens.

Hey Júnior,

I believe this will work in both Safari and Google Chrome.


But you're out-of-luck with web browsers like Firefox that are NOT AppleScriptable.