Bug 1886371 part 5: Implement the UIA AutomationId property. r=nlapre

We need this for our tests so they can find elements they're testing.

Differential Revision: https://phabricator.services.mozilla.com/D205183
This commit is contained in:
James Teh 2024-03-25 03:28:05 +00:00
parent 12770de85d
commit a93f20a1ad

View File

@ -238,6 +238,17 @@ uiaRawElmProvider::GetPropertyValue(PROPERTYID aPropertyId,
break;
}
case UIA_AutomationIdPropertyId: {
nsAutoString id;
acc->DOMNodeID(id);
if (!id.IsEmpty()) {
aPropertyValue->vt = VT_BSTR;
aPropertyValue->bstrVal = ::SysAllocString(id.get());
return S_OK;
}
break;
}
case UIA_IsControlElementPropertyId:
case UIA_IsContentElementPropertyId:
aPropertyValue->vt = VT_BOOL;