There's probably more than one way to solve this. but it may depend upon which browser you are using and you didn't state which one you were using.
KM has groups of actions to support selecting and setting fields in Google Chrome and Apple Safari. It seems that your knowledge of HTML is better than mine so you're more likely to find the appropriate action and set its arguments correctly.
Another approach that could work, under certain conditions, is the Find Image action. You could execute the action to click on the middle of the button by taking a screenshot of the button and placing it into the action. This is not the recommended option but I use it a lot.
There may also be an AppleScript solution but I'm not capable in that language yet.
I would be pleasantly surprised if that action worked on web pages. I believe it only works on macOS application buttons. Although I admit the wiki says one "The Press a Button action presses a named button in the front window."
Interesting assertion. I searched around. I found a button which looked like it was being selected when the Press a Button action was executed. Here's the HTML for that button.
<button name="button">Click me</button>
I also found a button for which the Press a Button action did click on it. Here's the HTML code for that button. This proves you were right, it can work on web pages. But most sites I tested did not seem to work. Apparently there are some HTML requirements. It looks like the key HTML code required is <button type="button">
Thanks for posting. I tried the JavaScript in Google Chrome and it didn't work (see attached macro screenshot). FYI: I added the alert just to make the sure the macro ran.
I checked the code and there are loads of buttons/links with the "action_button" class. So I'm not sure how to target this one specifically. If it's useful, the button I'm trying to click is the first button on the page (and always will be).
I wish I could provide the full page HTML, but it's for a client I'm working with. Do you have any other suggestions?
The only problem is that that page doesn't have the button I'm trying to click. (I think it's a demo page Basecamp uses.) But hopefully it gives you a chance to look at the live code (the rest of the page looks to be the same).
Thanks. I tried the "Press Button" and it didn't work either. Frankly, I'm surprised it's this challenging to do something so simple—but I'm probably missing something.
Nope. To develop the JavaScript, I really need access to the HTML.
Do you perhaps have a test case record/project in Basecamp that does not expose any sensitive data? Or create one. If so, perhaps you could share HTML from that.
Or, if you have a personal test account with dummy data, I could use that.
Nope. To develop the JavaScript, I really need access to the HTML.
Do you perhaps have a test case record/project in Basecamp that does not expose any sensitive data? Or create one. If so, perhaps you could share HTML from that.
Or, if you have a personal test account with dummy data, I could use that.
Would it help if you viewed this public Basecamp page?
I'm no longer able to help because I'm not smart enough to handle this topic now. Compared to JM, I'm a rube, a noob, and a boob. Glad you have him helping you. Basically I'm first line support, JM and others here are second line support, and Peter N Lewis is third line support. I hope nobody is insulted by these assertions.
Just tested this and works in basecamp 3:
1.- Pause until conditions
The screen contains (image)
2.- Move and click at center
found image center (image)
Thanks for this; I tried this before (as Sleepy noted) but couldn't get it to work. I wonder if my click placement is off. Could you post a screenshot of your macro? It'd be great to see step-by-step.