-
Notifications
You must be signed in to change notification settings - Fork 479
Description
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("B").Visible is true.
So my problem is. Button "B" is offscreen obviously because adorner layer of button "A" is not visible anymore. So why does button "A" loose its focus so fast after a click? How can I click on button "B"?