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

Problem with MahApps.Styles.Slider style causes TestStack.White AutomationException #4450

Open
kamalkaushik1 opened this issue Dec 18, 2023 · 0 comments
Labels

Comments

@kamalkaushik1
Copy link

kamalkaushik1 commented Dec 18, 2023

Describe the bug

When using MahApps.Styles.Slider.Win10 or MahApps.Styles.Slider styles, TestStack.White.AutomationException occurs when calling Increment(double d).

After reviewing the code implementation for MahApps.Styles.Slider.Win10 and MahApps.Styles.Slider styles, I discovered that the names of the DecreaseRepeatButton and IncreaseRepeatButton properties have been changed to HorizontalTrackDecrease and HorizontalTrackIncrease, respectively. However, TestStack.White is still referencing DecreaseLarge and IncreaseLarge

Note: This behavior is not observed with MahApps.Styles.Slider.Flat as it is using the names as DecreaseLarge and IncreaseLarge.

Steps to reproduce

  1. Use MahApps.Styles.Slider.Win10 or MahApps.Styles.Slider style in a WPF application.
  2. Use TestStack.White to interact with the Slider, e.g., calling Increment(double d).

Expected behavior

Expected Behavior:
When using MahApps.Styles.Slider.Win10 or MahApps.Styles.Slider styles and interacting with the Slider through TestStack.White, the HorizontalTrackDecrease and HorizontalTrackIncrease should be updated to DecreaseLarge and IncreaseLarge to keep it consistent, so it is recognized as the respective RepeatButtons.

Actual behavior

When using the MahApps.Styles.Slider.Win10 or MahApps.Styles.Slider style and calling the Increment(double d) method with TestStack.White, an AutomationException is thrown. The specific error message is: "Failed to get (ControlType=button or ControlType=check box), AutomationId=IncreaseLarge."

Environment

MahApps.Metro version: v2.4.10
Visual Studio: 2022 17.7.0
Target Framework: .Net framework 4.7.2

Screenshots

sliderIssue
Slider.xmal
image
vs
FlatSlider.xmal
image

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

No branches or pull requests

1 participant