since apple has integrated full ui automation tool applescript (ancient, yes...ugly, yes; can't find better), wondering if can run applescript script, inside python unit test class.
i did find abandoned project integrating , python, use stable , reliable; , of all, easy implement.
i did @ pyobjc , quite pain deal (i know nothing objective-c), last resort did try, use as, have no way results actions, unless use python. unless there easier way, not know
py-applescript provides easy-to-use wrapper around pyobjc , nsapplescript
calling handlers , converting python arguments , results , equivalents automatically. (strictly speaking no longer support py-appscript either - py-appscript i'm no longer willing throw time after bad - py-applescript code simple enough python user can figure out how fix or improve herself if necessary.)
alternatively, can avoid module dependency using both pyobjc , applescriptobjc bridge way python applescript, though require basic understanding of both objc bridges it.
the other option doing apple event automation in python use os x's crappy scripting bridge framework via pyobjc, since sb riddled ton of incomprehensible bugs, defects, , omissions of own, that's last thing want inject test scripts.
...
otoh, if you're only doing graphical ui testing, calling os x's low-level accessibility apis via system events.app via applescript via python arguably overkill anyway, , may want around existing python gui automation libraries wrap os x's accessibility apis directly. e.g. here's useful-looking list, although can't vouch accuracy or completeness, or quality of libraries links to.
Comments
Post a Comment