bharu
bharu

Reputation: 27

How to check is password field exists in a desktop GUI application?

I am working in Desktop GUI Application. Is there any way to check the desktop GUI application has password field or not from c++ or c#? I wan it only for desktop based not for browser based window application?.

If it is possible, can I access those elements means controls?

Upvotes: 0

Views: 234

Answers (1)

Krumelur
Krumelur

Reputation: 32597

In classic Windows (Winforms, Win32), once you get the HWND you can check for the ES_PASSWORD window style.

Nowadays, it is not that simple though, since there are multiple UI technologies being used for various applications. In general, you would need to find out if the app uses Winforms, WPF, QT, HTML5, XUL, or some other tech, and each has its own edit control.

If the app is well-behaved, you may be able to use UI automation to fill the password field. IIRC, Winforms and WPF apps implements UI automation by default.

Upvotes: 1

Related Questions