Solution is to use Microsoft UI Automation
AutomationElement rootElement = AutomationElement.RootElement;
if (rootElement != null)
{
Condition condition =
new PropertyCondition(AutomationElement.NameProperty, "WindowSplash");
AutomationElement appElement =
rootElement.FindFirst(TreeScope.Children, condition);
if (appElement != null)
{
Condition condition =
new PropertyCondition(
AutomationElement.AutomationIdProperty, "element1");
AutomationElement element =
parentElement.FindFirst(TreeScope.Descendants, condition);
if (element != null)
{
ValuePattern valuePatternB =
element.GetCurrentPattern(ValuePattern.Pattern) as ValuePattern;
valuePatternB.SetValue("hello automation world!");
}
}
}