Chrome turns on no-interface browsing mode python+windows environment

Source: Internet
Author: User

Environment: Python 3.5.x + Selenium 3.4.3 + chromedriver 2.30 + Chrome Beta + win7/win10

Chrome_options = Webdriver. Chromeoptions () chrome_options.add_argument ('--headless'= webdriver. Chrome (chrome_options=chrome_options)

The code is simple, but the environment to emphasize that the latest version of Chrome is 59,MAC and Linux version has supported no interface browsing, but Windows will have to wait until July to release the 60 version, but now can download 60 beta version, tested is available, The following is a description of the official link:

Https://developers.google.com/web/updates/2017/04/headless-chrome

Chrome Beta: Http://www.chromium.org/getting-involved/dev-channel/Beta channel for Windows (64-bit) or Beta channel For Windows (32-bit)

Current beta does not automatically close chrome when the Python main process exits, consider Chrome Canary, Chrome Canary has no interface mode, Chrome Canary has less memory than chrome.

If you call Chrome Canary, you can specify the path to Chrome's run file and call it to Chrome Canary correctly:

chrome_options.binary_location = ' C:/users/roy/appdata/local/google/chrome sxs/application/chrome.exe '

Chrome turns on no-interface browsing mode python+windows environment

Related Article

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.