WinAppDriver does not find elements by accessibility_id in a Windows Store Share dialog.
STEPS:
I have an application that lets me share log files
- When I click on a button Share dialog pops up giving me windows store apps I can use to share my log file such as Mail, OneNote, etc
- Any element having AutomationId, including Mail Windows Store App can not by found by AutomationId but can be found by Name (see attached image)
- However, Inspect.exe app sees both Name and AutomationId (as per attached image)
Below is code sample using Name that works and code sample using AccessibilityID that fails.
CODE THAT FINDS ELEMENT USING NAME
When /^I see external element "([^\"]*)"$/ do |name|
sleep(2.0)
desktop_session_setup()
item = $DesktopSession.find_elements(:name, name)[0]
desktop_session_end()
unless item != nil
fail("External element with #{name} not shown.")
end
end
CODE THAT FAILS TO FIND ELEMENT USING ACCESSIBILITYID
When /^I see external "([^\"]*)" by id$/ do |accessibility_id|
sleep(2.0)
desktop_session_setup()
item = $DesktopSession.find_elements(:accessibility_id, accessibility_id)[0]
desktop_session_end()
unless item.displayed?
fail("Item with id #{accessibility_id} not found.")
end
end

