Open raghavnaphade opened 1 year ago
@vojtabohm, hope you are doing well! Have you recently tested if your approach still works? I have tried setting AXManualAccessibility
to true on the Firefox process, but get errors both on AppleScript and Swift. Thanks.
Hey @jntstewart. I haven't tried it in a while but if I remember, even though it returned errors, it still worked.
I found one forum link I checked in the past. They say Firefox actually needs the AXEnhancedUserInterface
attribute. But I believe some other people reported this attribute breaks window behavior on some other apps...
Just try it, experiment with these two attributes. I also remember I had a delay of 3 seconds after an app was opened (to wait for it to load) before I toggled these attributes.
Some combination of these things worked for Firefox in the end.
This is because it does not work with the approach this library uses (which is to use AppleScript to 'tell' the browser to return it's url). I solved this a while ago on my macOS project. You can actually use Accessibility API to get it.
AXManualAccessibility
on the Firefox process, which will enable it's DOM to be visible (this property tells the app a 'Screen reader' is present on the screen, so this is a sort of a hack).url
attribute and read that.It's a hassle to add this, but unfortunately, no better way to do this for Firefox. I read their forums a while back.