Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to click button in adorner layer #668

Open
veronikaaveron opened this issue Apr 16, 2020 · 0 comments
Open

Unable to click button in adorner layer #668

veronikaaveron opened this issue Apr 16, 2020 · 0 comments

Comments

@veronikaaveron
Copy link

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"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant