c# - TestStack White with a tray window -
i need interact application, that resides in tray. i'm currenty using teststack white way:
processstartinfo processstartinfo = new processstartinfo("myprog.exe"); application application = application.attachorlaunch(processstartinfo); _window = application.getwindows()[0];
everything works if application not running before call, since launching it, visible.
instead, if application running, , in tray, white not find window, , can see in console following log:
could not find windows application
...and, after retries, fails exception. now, best solution found kill application , relaunch it:
application.kill(); application = application.launch("myprog.exe");
and works. guess there better solution this.
open application want automate , print running process names, find stands application.
the add following code...
application myapp; myapp = application.attach("processname");
hope helps...
Comments
Post a Comment