Just updated to 10.14.4 and the action Wait For Safari to Finish Loading is not working properly.
It never actually "completes" the action and KM keeps "waiting" forever.
It looks like if I interact with the URL/Smart Search Field with the β+L shortcut the action works.
Any ideas?
See this from @peternlewis
Unfortunately, in the latest βupdateβ to Safari, 12.1, they have broken the disabling of the Stop menu when the page has finished loading. As such, the Wait For Safari to Finish Loading action waits forever waiting for Safari to disable the Stop menu.
Unfortunately there is no workaround for this. Keyboard Maestro would fall back to ignoring this is the menu was not there, but since disabling a menu item when it is unnecessary dates back to 1984 or so, this failure was not one I anticipated.
β¦
Thanks, Jimmy.
It's a shame they remove it.
I'll try to incorporate the %SafariReadyState% token on my workflows.
This is a major problem. I use this action in 90% of my macros. Any ideas on how to work around this would be greatly appreciated.
My workaround (at this moment) is to replace all instances of that action for an "Alert" and I wait for the page to load. Obviously, that only works for macros that are not scheduled.
However, Peter is suggesting something like "Pause Until Conditions are Met", using the text token %SafariReadyState% is "complete".
I haven't tested that solution yet.
I have created a Plug In Actions to replace the broken built in one. Hopefully Apple will fix Safari, but probably not.
Here is a Plug In Action that performs similarly to the Wait For Safari to Finish Loading action. It is not as good, since the Stop menu used to be quite helpful in determining whether a page was loading, but since that is no longer the case in Safari 12.1 this will have to do.
It is pretty straight forward, but I have not done much testing of it. Hopefully it works - if any AppleScript gurus (@ccstone ?) want to look and check I have not messed up my AppleScript coding, that might be wise.
Fβ¦
The plug-in solves the issue for me Peter. Thank you!
1 Like
I found a different solution. I replace Wait For Safari to Finish Loading with Pause and it worked!
The "Pause" action is an alternative.
Unfortunately it's not reliable enough since webpage loading times vary. I guess it could work with a high enough pause value for any give webpage, but that's an ugly solution.
Hmmm, weird maybe I wasn't using 'Wait for Safari to Finish Loading' correctly. I always had to put in a time for loading.
See my simple native solution to wait for Safari to finish loading here . Doesn't need a plugin!
1 Like