Some experiences of browser Automation 7 selenium Webdriver Some questions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.