I
I
Ivan Tenoshvili2019-11-10 17:25:56
Google Chrome
Ivan Tenoshvili, 2019-11-10 17:25:56

How to close Chrome WebDriver console opened via task sheduler?

Good afternoon!
Case:
1. I create a standard console application in c#.
2. I connect libraries.
3. I write simple code.

IWebDriver driver = new ChromeDriver();
            driver.Navigate().GoToUrl("ulr");
            driver.Quit();

4. I compile the application - everything works ok: the standard chronium console starts, chrome starts and the link opens and it all closes (chrome and then the console).
5. I add the executable file of my application to the planning ones.
6. The Windows console starts, then (!) the chronium console, then the chrome itself and the url.
The Windows console closes instantly, the chronium console does not close, and chrome does too. Although the function is there.
How to kill console and application after execution?
Maybe someone faced such a problem? It seems that the connection between the chronium wd prompt and the script itself is falling off.
I tried to turn off the console at the initialization stage - it works if you run it through the debugger. If through the scheduler, the console also hangs.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question