daveenguyen / atomacos

Automated Testing on macOS
https://daveenguyen.github.io/atomacos/
GNU General Public License v2.0
47 stars 13 forks source link

BigSur support #14

Open alekseijershov opened 4 years ago

alekseijershov commented 4 years ago

Hi!

I'm tried to use atomacos on the new Mac OS BigSur. And I received an exception message, but the UI action was successful. My steps:

  1. Open System Preferences -> Security and. Privacy
  2. Execute next code

` import atomacos

main_window = atomacos.getAppRefByBundleId('com.apple.systempreferences')

main_window.buttonsR('Click the lock to make changes.')[0].Press()`

Actual Result:

File "/Users/test/Desktop/main.py", line 5, in <module> main_window.buttonsR('Click the lock to make changes.')[0].Press() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/atomacos/AXClasses.py", line 226, in performSpecifiedAction return action() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/atomacos/_a11y.py", line 74, in perform_ax_action self._perform_ax_actions(item) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/atomacos/_a11y.py", line 270, in _perform_ax_actions PAXUIElementPerformAction(self.ref, name) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/atomacos/_macos.py", line 226, in PAXUIElementPerformAction errors.check_ax_error(error_code, error_messages) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/atomacos/errors.py", line 118, in check_ax_error raise AXErrorFactory(error_code)(error_message) atomacos.errors.AXErrorAttributeUnsupported: Unknown AX Error: -25205