Click on Chrome button

I am trying to click on a button on a URL. I am able to open the URL, but I must not be understanding how to "Move and click from the center of a found image." I dragged the image into place when it says e. This is a screen shot of the button. What am I doing wrong. Nothing happens. Apparently the button is not clicked on. I am uploading a screen shot of the URL where I am trying to click on a button38 and another screen shot of the macro that I made.(upload://dABFRkXhoMORDiVtp9ehwyuGrmr.png)

It seems that I could just as well hit the tab key 4 times, and the click on a button called "Log in" but that macro also does not work.

This is probably very simple, but I am not reading your excellent manual very well either.

I don't see the screenshot of the Macro that I made. Here is another try at uploading it.

I'm feeling a bit stumped myself here. This shouldn't be a hard problem. We will be able to fix it. Since I can't see the problem right now I recommend doing two things.

  1. Add this statement to the top of the macro:

  1. Then start the KM Debugger. Then trigger your macro. Then watch what happens in the debugger window. This helps you follow along what your macro is doing. But it also has a side effect - it gives the OS a chance to keep up with your quick running macros. If adding this line makes it work, then we know it's a timing issue. If it still doesn't work, then we will find the correct solution.

Although I love the Find Image action, which you are using in the last action, I find it's a little finicky with solid colours. If there is a keyboard sequence that is equivalent to clicking on the button, perhaps pressing ENTER, then I suggest that you try it. You said it wasn't working either, but in my opinion it's easier to debug a keypress macro than a mouse click macro.

If you want to stick with the mouse click macro at the end, that's fine. Then perhaps add this after that action. This will tell you verbally if the Find Image command worked or not. It might give us some insight into your problem. Usually when an action fails there's a popup in the upper right of the screen, but I'm not sure if you saw it or not, so doing this may help clarify things a bit.

There are people who are smarter than me on this forum that will probably figure it out faster than me, but this might send us in the right direction if you take my advice.

@Ellenm Find Image actions no longer work properly with Chrome thanks to some incomprehensible accessibility changes that the Chrome devs made. The next version of KM is reported to include a workaround, but in the meantime, the Click Browser Link action is a much better choice for this sort of thing anyway. Try this macro out and see if it does the trick; it seems to work in my testing:

Login Rocket Spanish.kmmacros (2.1 KB)

It says Brave Browser in the screenshot because I've set KM to use that instead of Chrome, but on your machine, it should still show up as Chrome and work accordingly.

1 Like

​Thank you Sleepy and g​g​lick​​.​

I tried to copy ​gglick's macro exactly.​ When I run it, I get the message, that​ does not exist.

I am a member of the site. Maybe that is why it does not exist​ for a macro​?

​I wonder where gglick got his link to the button. /html/body/div[3]/div/div/div[1]/div[2]/form/div[4]/div/button

I tried inspecting it, but I would never have guessed your formula from what I saw. ​

Anyway, I must have made some mistake. Do you see it?

You're welcome.

You don't need to copy it; you can download the one I made by clicking the link above its image.

This is very strange because I originally got that URL from the image of your initial macro, so it should work. Your being a member of the site has nothing to do with whether it would exist or not. Without seeing the macro you created, all I can guess is that there's a typo or extra space or something in the URL that would make it invalid.

That's the login button's XPath, which is mentioned in the Click Browser Link action wiki entry I linked above. I got it by right clicking the button, choosing Inspect, then right clicking the resulting highlighted element in Chrome's web inspector and selecting Copy Xpath

I'm afraid we can't see anything if you don't upload your actual macro. You already know how to post an image of it, which certainly helps, but the best thing to do is post the actual macro file as well, instructions for which you can find here: Forum [Keyboard Maestro Wiki]

I would not have guessed that in a million years. And it sounds like you must be one of those people with access to a Beta of 9.0. Congratulations. I'm not sure I would even want an advanced copy, because it would sorta be like seeing an early draft of a major motion picture before opening day and then having to fill out a 100 page form answering questions about what you liked and didn't like.

The problems with Chrome and Found Image have been a recurring issue for some time; at least September 2018 based on a quick forum search. Since I don't use Chrome as my primary browser or many macros with Found Image, the only way I learned about this was by frequenting this forum. Found Image actions can still work with it in the release version of KM, but only by searching in a defined area or the whole screen; front window won't work at all.

And no, while I'm greatly looking forward to KM 9, I'm not actually not beta testing it. I just remember Peter saying somewhere on this forum that 9 will include a workaround for this problem, since it affects so many of KM's users.
For the record, I believe pretty much anyone who wants to beta test KM can (Peter essentialy said as much here: but since it's recommended that beta testing be done with an install of macOS that doesn't contain any crucial data, I decided I'd rather wait for the official release.

Oh wow. I didn't know that about the Beta. It's tempting, but I'm also going to be on a medium length vacation shortly. I just hope v9 doesn't come out while I'm away. That would be like missing Christmas. (I think it should probably not arrive until after Mojave to take advantage of its features.)

In another thread today I posted how I attempted to get around an app that wasn't working well with KM by getting an HDMI copier device and copying the screen to a different computer. If you're interested I'm sure you can find it. Not many people will buy a hardware device to solve a software problem.

To be clear, it is still possible to use KM to Find Images in a Chrome Browser. I do this many times a day.

The part that is broken is in restricting the KM Found Image Action to "the front window".

Until KM9, the workaround is either of these:

  1. Restrict to a "Screen"
  2. Restrict to an "Area", where the Area can be defined by %FrontWindowFrame% token

For more info see:
Issue: Found Image Condition NOT Working in "the front window"

1 Like