1. Download the image
The link is best, and almost all possible methods are enumerated, except that it does not mention the use of urldownloadtofile, but it is similar to WebClient.
https://stackoverflow.com/questions/18424624/using-selenium-to-save-images-from-page/48871283
2. Full Exit Selenium
In general, you can use Webdriver's Quit method. But in some cases, it may be useless. At this point, we can only kill the process.
Interestingly, the way Iewebdriver and Chromewebdriver kill the process is not the same. ie this is OK:
foreach inch Process.getprocessesbyname ("iedriverserver")) { ps. Kill (); }
However, this method does not apply to Chromewebdriver, the above code after execution, from the process list can not find chromedriver, but the window is still displayed.
After testing, the following link Aalhanane answer work, the disadvantage is that the execution time is longer:
https://stackoverflow.com/questions/21320837/release-selenium-chromedriver-exe-from-memory/21320949
Some experiences of browser Automation 7 selenium Webdriver Some questions