add automation name for history and memory list item (#1628)

* add automation name for history and memory list item

* fix UI tests

Co-authored-by: Yiyi Zhang <Yiyi.Zhang@microsoft.com>
This commit is contained in:
oneonezhang
2021-08-03 12:29:35 +08:00
committed by GitHub
parent 8ebeaa6356
commit d54403c578
8 changed files with 33 additions and 24 deletions

View File

@@ -19,11 +19,13 @@ namespace CalculatorUITestFramework
public string GetValue()
{
return Item.FindElementByAccessibilityId("HistoryItemValue")?.Text;
var equalSignIndex = Item.Text.IndexOf("=");
return Item.Text.Substring(equalSignIndex + 1).Trim();
}
public string GetExpression()
{
return Item.FindElementByAccessibilityId("HistoryItemExpression")?.Text;
var equalSignIndex = Item.Text.IndexOf("=");
return Item.Text.Substring(0, equalSignIndex + 1).Trim();
}
}
}

View File

@@ -19,7 +19,7 @@ namespace CalculatorUITestFramework
public string GetValue()
{
return Item.FindElementByAccessibilityId("MemoryItemValue")?.Text;
return Item.Text;
}
}
}