GithubHelp home page GithubHelp logo

Focus required for interactions about axswift HOT 4 OPEN

tmandry avatar tmandry commented on August 19, 2024
Focus required for interactions

from axswift.

Comments (4)

soundflix avatar soundflix commented on August 19, 2024

Try to AXRaise the parent window of the element that you want to perform an action on.

from axswift.

nameghino avatar nameghino commented on August 19, 2024

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.

soundflix avatar soundflix commented on August 19, 2024

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.

DavidMolnar-RS avatar DavidMolnar-RS commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.