I found that if I search an IUIAutomationElement whose name contains whitespace, the FindFirst method returns nullptr, instead of the correct answer.
uiaPtr->CreatePropertyCondition(UIA_NamePropertyId, _variant_t(L"Alisha Chinai"), &search_condition);
//
auto ret = parent_uia->FindFirst(TreeScope_Subtree, search_condition, &target_uia);
I checked that the target_uia element I expect returned in the tree.
How can I fix this?