I'm having some problems cleaning up some of the processes my windows form application creates.

I'm using selenium which starts a process instance of a browser and a browser driver among other things.

Selenium library provides a Quit() method which if called inside my running application works just fine at cleaning up.

My problem is, that if my app is simply closed via the rex cross I cannot call Quit().

I have tried a number of things like creating a destructor for Form1 and calling Quit there, no luck. Tryed adding the following in Form1 class...

private void Form1_Closing(object sender, System.ComponentModel.CancelEventArgs e)

And that does not seem to work either.

Basically, it seems as though Quit() only works if I call it inside the public Form1() method.

Any suggestions on what I'm missing?

Thank you for reading.

Edited by Suzie999

2 Years
Discussion Span
Last Post by Suzie999

Please disregard, made simple rookie mistake not linking handler to event.


This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.