Why does selenium chromedriver use less resources than regular chrome Why does selenium chromedriver use less resources than regular chrome selenium selenium

Why does selenium chromedriver use less resources than regular chrome


The Selenium driven ChromeDriver initiated v87.0.4280.88 browsing context is initiated with these additional Command Line Switches:

  • --disable-background-networking: Disables several subsystems which run network requests in the background.
  • --disable-client-side-phishing-detection: Disables the client-side phishing detection feature.
  • --disable-default-apps: Disables installation of default apps on first run. This is used during automated testing.
  • --disable-hang-monitor: Suppresses hang monitor dialogs in renderer processes.
  • --disable-popup-blocking: Disables pop-up blocking.
  • --disable-prompt-on-repost: This switch may be used to disable that check that the user had attempted to navigate to a page that was the result of a post.
  • --disable-sync: Disables syncing browser data to a Google Account.
  • --enable-automation: Enables indication that browser is controlled by automation.
  • --enable-blink-features=ShadowDOMV0: Enables one or more Blink runtime-enabled features.
  • --enable-logging: Controls whether console logging is enabled and optionally configures where it's routed.
  • --log-level=0: Sets the minimum log level.
  • --no-first-run: Skip First Run tasks, whether or not it's actually the First Run.
  • --no-service-autorun: Disables the service process from adding itself as an autorun process.
  • --password-store=basic: Specifies which encryption storage backend to use.
  • --remote-debugging-port=0: Enables remote debug over HTTP on the specified port.
  • --test-type=webdriver: Type of the current test harness ("browser" or "ui" or "webdriver").
  • --use-mock-keychain
  • --user-data-dir="C:\Users\username\AppData\Local\Temp\scoped_dir9640_113432031: Directory where the browser stores the user profile.
  • data:,

The usage of these additional commandline switches makes the initialization of the Google Chrome process requires less callbacks as well as disables a lot more callbacks

Apart from that, Flash used by the regular chrome session is:

32.0.0.465 C:\Users\username\AppData\Local\Google\Chrome\User Data\PepperFlash\32.0.0.465\pepflashplayer.dll

Where as, Flash used by the ChromeDriver initiated chrome session is:

30.0.0.154 C:\WINDOWS\system32\Macromed\Flash\pepflashplayer64_30_0_0_154.dll

For the above mentioned reasons the ChromeDriver initiated Google Chrome is lighter and less memory consuming then the regular Google Chrome.