appium / appium-for-mac

[deprecated] Application for automating a mac app with JSON wire protocol
Apache License 2.0
193 stars 70 forks source link

Operator "or" does not work for /AXApplication #99

Open meskmanz opened 4 years ago

meskmanz commented 4 years ago

I noticed that the Notification Center on Mac OS has a different title on different Mac OS versions so for my test I decided to use the following condition @AXTitle='Notification Center' or @AXTitle='Notification Centre'. But I bumped into the problem that it does not work in some of my XPathes. So I have the following XPath: "/AXApplication[@AXTitle='Notification Center' or @AXTitle='Notification Centre']/AXWindow/AXScrollArea/AXTable/AXRow/AXCell/AXButton[@AXIdentifier='titleCloseButton']" where I have boolean operator "or" placed in /AXApplication section and driver cannot find element using this xpath. However, XPath: /AXApplication[@AXTitle='SystemUIServer']/AXMenuBar[0]/AXMenuBarItem[@AXTitle='Notification Center' or @AXTitle='Notification Centre']" works fine.