The World’s Largest Online Community for Developers
I'm writing a really basic AppleScript app that can clock me in/out everyday in Safari (many reasons why, the app is terrible/I'm stupid). I've gotten all way up to the actual "Clock In" button, which seems to be less of a button and more of an event-based function with mouseups and such.
I've tried pretty much every
The problem seems to be (me) not knowing which span to try and click on (see screenshot), or how to activate the mouseup before clicking if necessary.
Here's a screenshot of hopefully most of the relevant information. Again, all I'm trying to do is get AppleScript to click on "clock in".
Outside of those properties,
parentElement all read
There seems to be a lot of meat in the Nodes categories, but I'm not sure if that's relevant.
Here is the main element that I believe contains the info I need:
<span class="timeClockButtonContainer"> <span data-dojo-type="dijit/_Widget" data-dojo-attach-point="ShiftStartBtn" data-dojo-attach-event="onMouseUp: _onShiftStartMouseUp " data-dojo-props="className: at('rel:', 'shiftStartDisabled').direction(at.from).transform(transformers.ShiftStartClass)" id="dijit__Widget_22" widgetid="dijit__Widget_22" class="timeClockButton ShiftStartNormal "> </span> <span data-dojo-type="Framework/UI/mvc/Output" data-dojo-props="value: localize('lblESSShiftStartButton'), className: at('rel:', 'shiftStartDisabled').direction(at.from).transform(transformers.ButtonClass)" class="ClockButtonTextEnabled" id="Output_90" widgetid="Output_90">In</span> </span>
The second span only refers to the text underneath the button. But wanted to be thorough and include it.
Of course, I'm aware that a regular old "System Event" click in AppleScript will work, but I intend to try and make this run in the background at some point.