Chrome: Clicking links on Google Websites no longer works


I had macros that click links in Chrome on Google Websites (e.g. o trigger an image search) that stopped working a few days ago. Also in the editor I no longer see any links for those sites in the dropdown. I tried to test a few other websites and it looks like it also stopped for many other ones. This is only a suspicion, though, because I had no macros before, so I can not really tell. But a test of ten websites and the editor only shows links for two of them

Does anybody have an idea?


Your installation of Chrome may have decided to stop accepting JavaScript requests via AppleScript.

You can try restarting Chrome, restarting your Mac (in case it is an AppleScript/Chrome issue), or perhaps if you are using the development version, you will need to either not do that or maybe change your preference settings, I'm not sure which.

Hi Peter,

thanks for your reply. I tried all your suggestions plus the last 3 versions of Chrome and it is always the same.

But, it is not completely broken. Only for some sites. When I click on the button in KM Editor, I see all the links for this Discours for instance, but when I bring a Google Search result page to the front, it says “no links found”:

Can everyone still click links for google searches?


I am using macros everyday for links in Chrome. However, I use the x path and not the drop down options. They all have been working fine.

I just tried the current Chrome, and the links on the Google Search result page appear for me in the Click Google Link page without issue.

So something else must be going on.

You can try using the URL: chrome://restart - I don’t know what it does, but I have heard it can fix some weird behaviours in Chrome.

No luck with all that has been suggested. Can I ask how you get those links in there? Like what API, technology, or language is used to query them. So that I have a bit more things I can search for.

Thank you,

Have you tried using an XPath in the KM Clink Link Action?
You can also try this macro (or use it as an example), which uses JavaScript in Browser:

MACRO: [WEB] Click on Link Using XPath [Example]

Yes, already did that some time ago and it works.

But it drives me nuts, when things stop working out of the blue and I don't know why. So I am still trying to find an answer, but my biggest pain is gone :slight_smile:

Thank you!

Keyboard Maestro uses AppleScript to ask Chrome to execute JavaScript.

Either of those could be failure modes - the AppleScript system periodically loses track of Chrome (probably related to its auto-update mechanism). And some versions of Chrome refuse to run JavaScripts.

But the weird thing is that it works for all websites except Google’s and a few other ones.

Then maybe something has changed on the Google page.
If you'd like more help, please post the HTML code around the link of interest.

1 Like

Thank you all for trying to help me. I don’t think it has anything to do with the html, because the KM editor does not pull in any links when I am on a google search result. Not a single one. And some people here reported that it does for them. So I guess it is something between chrome and KM.

But I’ve given up and moved to XPath which works.

Thanks again,

Hey Julian,

What this means is that Google has changed their code, and Peter's link-detection code isn't working with it.

It may or may not be worth his time to fix it.


Well, without a real-world example, we really can't help you, or even determine the problem.
I'm running the latest version of both Chrome and KM, and I have many macros that use XPath and/or other JavaScript in Browser quite successfully.

So, at this point, I don't see anything for @peternlewis to investigate.

I am not 100% sure what you mean by real world example, because this is so simple:

Links from Google websites do not get pulled into the KM editor

While it works on other website:

As an example, I used a couple of macros to change the image size in Google Image Search for around a year before they suddenly stopped working:

Tried with:

  • macOS 10.13.3 and 10.13.4
  • Chrome 65.0.3325.181, 64.0.3282.140, 63.0.3239.108 & 62.0.3202.75
  • KM 8.2

That's it. Thank you!

So, by "Google websites", you mean the results page of a Google Search, correct?
If so, then I probably have a solution for you. Maybe the native KM Action can't see the links, but I have a JavaScript in Browser that can.

So, please confirm you mean Google Search, and provide the URL of a typical search you perform, and identify what you want to get off of the page. What criteria do you use to select a link of interest?

I am so sorry, that this wasn't clear. Yes, but not only Google search, anything that has an URL that ends with does not work. GMail for instance does not work too.

My solution is using XPath, which works as expected, so I am already happy. I just think that it is a really weird problem (or maybe a bug) that might affect other people as well.

But I am still interested into looking into your solution. One of my use cases is doing a google image search and then altering search parameters, like the resolution.

So the URL would be something like this:

And then click on a link like this one:

  • As KM nativ action (when they still worked): 2 MP (1600×1200)
  • As XPath (what I am using now): //*[@id="iszlt_2mp"]


OK, so you have a solution for your problem, but you're just curious as to why the native KM Action Click Link doesn't work.

Well, I don't have a direct answer to that, but I can tell you that while the KM Action often works, sometimes it does not, due to the complexity of the web page. It's been this way for at least a year or two. I've not noticed any recent changes in KM behavior.

So, it's like different tools in your tool kit. Sometimes one tools works, but another doesn't. :wink:

You've now reported this behavior, so @peternlewis can investigate if he so chooses. But I would never expect the KM Action to work 100% of the time. There is just too much variation in web pages.

In regards to websites. Then sometimes they do A/B testing.
So the Google result page underlying html is maybe not the same for all.

1 Like

I just wanted to say that I have exactly the same problem. It just stopped working on websites it has been working on before and it is not that the websites got changed, it is that KM changed something.

1 Like