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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -