Open neilyoung2008 opened 5 years ago
What is an edit control?
class name is Edit , control type is Edit , as above .
What does the xaml for the control look like?
There is API for finding custom controls but it is not pretty. Something like below should work:
var edit = window.FindFirst(
TreeScope.Descendants,
new AndCondition(Conditions.ByClassName("Edit"), Conditions.ByControlType(ControlType.Edit)),
x => new EditControl(x),
Retry.Time);
Where EditControl
is your custom wrapper.
If this is a WPF control we should definitely support it in a better way.
Can you make a pull request with a window containing the control? Placing it in this folder would be perfect: https://github.com/GuOrg/Gu.Wpf.UiAutomation/tree/master/TestApplications/WpfApplication/Windows
FindChildAt(Index)is work,but SOMETIMES the index is not const in different app version, why not add the interface named FindEdit like “FindTextBox" ?