79726173

Date: 2025-08-05 13:28:03
Score: 0.5
Natty:
Report link

Use absolute path instead of just a single path directory name.

import pathlib

script_directory = pathlib.Path().absolute()

options.add_argument(f"user-data-dir={script_directory}\\userdata")

I hope that this will fix selenium.common.exceptions.SessionNotCreatedException exception in most of the case.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: jak bin