Comments (4)
Try to AXRaise
the parent window of the element that you want to perform an action on.
from axswift.
I tried sending AXRaise
to both the Application
object and to all its top level windows, still doesn't work.
However, I got it to work by using the NSWorkspace
APIs and then calling activate(withOptions:)
on the target app.
from axswift.
What do you mean with "top-level windows"? A window is always first level above Application. And you have to raise the window that contains your target element, not all.
But some apps just don't behave so well with Accessibility.
from axswift.
Some (not all) AX Objects for buttons and the like will have an attribute ".focused". Check if the ".focused" attribute is there and then set it to "true". Once you set this, then try your .performAction(.press). I found this was a requirement from Big Sur and later for some AX Objects. Use the Accessibility Inspector and see if an attribute "Keyboard Focused" is there and if it is set-able.
from axswift.
Related Issues (20)
- Check for isFinishedLaunching when initializing an Application from NSRunningApplication HOT 1
- "checkIsProcessTrusted" always returns false when move the App into "/Application" folder HOT 2
- Ways to get z-index HOT 2
- How do I grant accessibility permission when debugging? HOT 4
- Application.init doesn't work with anything other than the built app HOT 1
- Could you release new version to fix Swift Package Manager issue?
- Xcode 11.4.1 errors w Swift 5.2.2 HOT 1
- Crash accessing .title attribute HOT 1
- Cannot find AXError type in scope HOT 1
- Allow custom AX notifications names
- How to use Parameterized Attributes
- Error installing via SPM: Could not find AXSwift for arm64-apple-macos HOT 2
- Switching between different apps, focusedUIElementChanged will not trigger HOT 2
- Using AXSwift with App Sandbox Turned On Triggers Errors HOT 2
- Cannot listen to MenuItem's Title changes in the app's MenuBar HOT 2
- Always getting error AXError.APIDisabled HOT 5
- Question - How do I create UI elements based on AXNotifications
- How to monitor the mouse to click the close button of the window?
- How to monitor the size and position changes of an AXUIElement in the window?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axswift.