TestStack / White

DEPRECATED - no longer actively maintained
Other
1.02k stars 485 forks source link

Unable to click button in adorner layer #668

Open veronikaaveron opened 4 years ago

veronikaaveron commented 4 years ago

I have following setup: there is a button "A" that has an adorner containing one other button "B". When I click on that button "A" using

Get<Button>("A").Click();

the adorner with the other button "B" appears for a short time (I suppose the button "A" loses focus after click() somehow, that's why the adorner is gone so fast).

Then I do

Get<Button>("B").Click();

but I get an exception

TestStack.White.AutomationException: Cannot perform action on Button. AutomationId:B, Name:, ControlType:button, FrameworkId:WPF, element is offscreen

Although Get