Hello,
I have a project, where I need to automate IE (v8, but the same is valid for v11 also, thus I think it is general). The browser is started (or not) from the user, independent from my application. Thus I need to attach to it, and execute a script. That is not a problem with WatiN:
IE ie = IE.AttachTo<IE>(Find.ByTitle("XYZ"),1);
ie.Eval("doit();");
So far so good. But my application won't exit. Actually the
main()
is finished, no statement left to execute, but the application is still not exiting. Except when the browser window is closed before I am closing my application. But I can't close it from my application and I can't make the user close it either - this is a constraint.
I had to actually kill the current process at the end of
main()
to stop it. But this is also not acceptable as the automation won't work when the application is restarted.
So, is there any way to "detach/release" attached instance with WatiN?
I am also open form alternatives as my ineraction with the browser is as simple as the sample above: finding a specific window and calling a script int that context.
Thank you,