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
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.
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?
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.
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
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.
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.
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.
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 google.com 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.
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.
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.
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.