Code
>>> import atomac
>>> context = atomac.getAppRefByBundleId('com.apple.SecurityAgent')
>>> print context
<atomac.AXClasses.NativeUIElement AXApplication u'SecurityAgent'>
>>> context.findFirstR(AXRole='AXButton')
>>> b =context.findFirstR(AXRole='AXButton')
>>> print b
None
After trying a couple of times, it magically worked, and then stopped working again.
>>> import atomac
>>> context = atomac.getAppRefByBundleId('com.apple.SecurityAgent')
>>> print context
<atomac.AXClasses.NativeUIElement AXApplication u'SecurityAgent'>
>>> context.findFirstR(AXRole='AXButton')
<atomac.AXClasses.NativeUIElement AXButton u'Cancel'>
>>> context.findFirstR(AXRoleDescription='secure text field')
<atomac.AXClasses.NativeUIElement AXTextField u''>
>>> tf = context.findFirstR(AXRoleDescription='secure text field')
>>> tf.sendKeys('a')
>>> context.findFirstR(AXRole='AXButton', AXTitle='OK')
<atomac.AXClasses.NativeUIElement AXButton u'OK'>
>>> btn = context.findFirstR(AXRole='AXButton', AXTitle='OK')
>>> print btn
<atomac.AXClasses.NativeUIElement AXButton u'OK'>
>>> exit()
Is this a bug in atomac?
Code
None
After trying a couple of times, it magically worked, and then stopped working again.
Is this a bug in atomac?