GuOrg / Gu.Wpf.UiAutomation

MIT License
96 stars 17 forks source link

PasswordBox validation #57

Open davishoang96 opened 6 years ago

davishoang96 commented 6 years ago

Hi Johan,

How can I get the value password from the passwordBox from the framework, something like

public void getPassword() { using (var app = Application.Launch("WpfApplication.exe")) { var window = app.MainWindow; var passwordBox = window.FindPasswordBox("password_txt"); var value = admin123; AssertException.AreEqual(value, passwordBox.password); } }

Thank you.

JohanLarsson commented 6 years ago

I don't think adding support for getting the password out of a PasswordBox is a good idea. Reason for this is that it could be used for nefarious purposes. Neither do I know if it is possible to do it.

What is your use case for this?

davishoang96 commented 6 years ago

My team are developing a checkpoint function for the automated testing tools. As the textbox, it was easy to validate the expected value although we can't validate the passwordBox because the black circles.