-
-
Notifications
You must be signed in to change notification settings - Fork 355
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
who can help me? #626
Comments
@weifan999 Is the application getting stuck? The statement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Code snippets
static void Main(string[] args) { try { Console.WriteLine("开始测试。。。。"); var path = @"C:\CshisNetProgram\Main\MainShellApp.exe"; var app = FlaUI.Core.Application.Launch(path); var automation = new UIA3Automation(); AutomationElement window; window = automation.GetDesktop().FindFirstDescendant(x => x.ByName("系统登录")); if (window == null) { Console.WriteLine("返回了空"); } Console.WriteLine("执行完毕"); Console.ReadKey(); } catch (Exception ex) { Console.WriteLine("错误:" + ex.Message.ToString()); } }
Describe the bug
When the form has not yet appeared, when the FindFirstDescendant statement is executed, null is not returned. Instead, the code seems to terminate execution and no error is prompted. It just cannot continue to run. How to solve this problem?
Screenshots
The text was updated successfully, but these errors were encountered: