Currently when we add accessibility id’s in swift ui elements for our mac desktop application I am not seeing the id’s in the driver.PageSource. Is anyone else seeing this problem?
Current Capabilities:
setCapability(“automationName”, “mac2”)
setCapability(“platformName”, “mac”)
setCapability(“appium:showServerLogs”, “true”)
Are these capabilities correct or should I use some other combination?
Here is a tutorial on adding accessibility id’s in swift:
Note that it discusses using the Xcode Accessibility Inspector to test the id’s. If Xcode can’t see them, Appium won’t be able to either. You should test them with Xcode & if can’t see them report a bug to the developer citing the article.
I can see the elements in the xcode accessibility inspector but not in driver.PageSouce. Do I need to add a bundle id or something else in the configuration to see the desktop application elements?
This is all I am setting…
Current Capabilities:
setCapability(“automationName”, “mac2”)
setCapability(“platformName”, “mac”)
setCapability(“appium:showServerLogs”, “true”)
I have the accessibility helper and its all configured correctly. It seems I have the mac2 driver running correctly with the correct desired capabilities set as well. When I start my automation and instantiate the driver and then do a driver.PageSource I do not see my specific element at all in the pageSource. I do see the element in the xcode accessibility inspector though. Please seem screen shot below. Notice the identifier is eg-gear-menu. If the element shows up here but not in pageSource, this seems like a bug with the Appium mac2 driver dealing with swift ui elements on mac os.
Any other thoughts here? If I file a bug who do I file it against?
You can file a bug on the github I referenced above for appium/appium-mac2-driver. Go to the issues tab to see current bugs & use New issue to file a bug.