Danh sách chromedriver


Khi mở profle sẽ có thư mục quyết định driver tương ứng

Link lấy danh sách download
googlechromelabs.github.io/chrome-for-testing/latest-versions-per-milestone-with-downloads.json
Tải về và gán vào code selenium

Set up Chrome options

def connect_to_debug_port(port):
# Set up Chrome options
chrome_options = Options()
chrome_options.add_experimental_option(“debuggerAddress”, f"localhost:{port}") # Specify the debug port
path_to_chromedriver = ‘D:/pythons/selenium_python_custom/chromedriver-win32/chromedriver.exe’
service = Service(executable_path=path_to_chromedriver)
# Launch Chrome using the configured options
driver = webdriver.Chrome(service=service, options=chrome_options)
print(“Conect port success”)
return driver