0

How to use selenium and chrome CFT for web automation from chrome version 115.x using python?

I have an automation script that worked fine until chrome version 114.x. From version 115.x it stopped working due to the version update, but also due to the new method with chrome cft.

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Aug 21 '23 at 22:06

1 Answers1

1

After upgrading to Chrome version 115.x, my automation stopped working, and chrome driver versions were no longer released, because from chrome version 115.x, automations are performed by CFT (chrome for test ), which as I understand this browser remains static until user action, preventing automations from stopping due to automatic chrome updates and need for crhome driver replacement. The problem was solved with the solution below:

# using selenium 4.8 and python 3.9

from selenium import webdriver
selenium.webdriver.chrome.options import options


options = Options()
options.binary_location = 'path to chrome.exe'
## this is the chromium for testing which can be downloaded from the link given below

driver = webdriver.Chrome(chrome_options = options, executable_path = 'path to chromedriver.exe')
## must be the same as the downloaded version of chrome cft.

As of today, the files can be downloaded from: https://googlechromelabs.github.io/chrome-for-testing/

Prefer the stable version and download the compatible browser and chromedriver.

The rest of the code continues to work.

source: Set chrome browser binary through chromedriver in Python