Issues with SendKeys
Wondering what is the problem with SendKeys? Or is it ok to use if you have开发者_JAVA技巧 no other choice?
Simulating user input generally indicates a hack, since the user interface is not an API (application interface), so its format is often inexact, subject to change and generally not intended to be used from code.
Sometimes, however, there is no other choice. Whether it's "OK" or not depends on what the alternatives are.
You should be much better off with Ui Automation
精彩评论