Reputation: 3091
I have defined a WPF Expander with an automation id similar to:
<Expander AutomationProperties.AutomationId="MyExpander">
Ranorex spy does not find the automation id, but instead it shows it as:
/form[@automationid='MainForm']/container[@automationid='MainGrid']//button[@automationid='HeaderSite']
Not sure why Ranorex Spy can't find the "MyExpander" automation id as other defined automation ids for radio buttons etc. within the expander are shown correctly in the Ranorex spy.
I'm using Ranorex Spy 8.1.2.
Upvotes: 0
Views: 435
Reputation: 3091
I found a solution and while not so nice it works.
I can find automation ids of radio buttons etc. within the Expander going two levels down, so going up like this:
var expander = MyRadioButton.Parent.Parent
and then executing QuickClick() on that element the WPF Expander will open.
Upvotes: 0