2gis / Winium.Cruciatus

C# Framework for automated testing of Windows application based on WinFroms and WPF platforms.
Mozilla Public License 2.0
137 stars 66 forks source link

Why is Parent an internal property of CruciatusElement? #89

Open fbrier-beckman opened 4 years ago

fbrier-beckman commented 4 years ago

Making this property public would be useful when traversing up and down a WPF tree.

fbrier-beckman commented 4 years ago

The title was changed because having access to the AutomationElement, via the Instance property, would be helpful. The use case is to utilize Automation events, such as AddStructureChangedEventHandler(), whose 1st parameter is an AutomationElement. For instance, if a button in my app causes additional structures to be added, how does the test register to know when that happens? In time the Cruciatus framework will be enhanced to wrap automation events, but that does not exist.