-1

So i did this for a Python Selenium Projekt:

You can do this by providing your chrome profile to the selenium.

First type this into your chrome address bar chrome://version/ and copy the profile path.

Note :- Remove the Default from the path i.e. if the path is /home/aditya/.config/google-chrome/Default then after removing the Default, the path will be /home/aditya/.config/google-chrome

then paste the profile path into the following code :-

options = webdriver.ChromeOptions()
options.add_argument("user-data-dir=/home/aditya/.config/google-chrome") # profile path
driver = webdriver.Chrome(chrome_options=options)
driver.get("https://www.google.com")

Now i want to undo this i reinstalled Selenium and tried some other things but nothing worked! Can anyone help?

Deployd
  • 11
  • 3
  • Problem Solved for anyone else having this Problem --> https://stackoverflow.com/questions/60296873/sessionnotcreatedexception-message-session-not-created-this-version-of-chrome/62127806 – Deployd Oct 04 '21 at 20:18

1 Answers1

0

Just erase the text you pasted there, you're configuring the Chromedriver to behave like a certain version of Chromium, so if you remove the line that is configuring it to do so, it will not longer do so. You are not permanently modifying the driver.

EDIT: THIS was the link that solved his problem.

Libra
  • 2,544
  • 1
  • 8
  • 24
  • Thats the Proplem all my Selenium Projekts are now using Chrome instead of chrome driver and chromes version is 94.... but selenium needs 91 my chromedriver has 91 but my chrome how i said before 94 and now all my Selenium Projekts are useless – Deployd Oct 04 '21 at 20:09
  • @Deployd I have no idea what you mean by "are now using Chrome instead of chrome driver." – Libra Oct 04 '21 at 20:10
  • so normally its using the chromedriver.exe in the folder but if i start the python file there is this error: ... raise exception_class(message, screen, stacktrace) selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 91 Current browser version is 94.0.4606.61 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe ... :and that error wouldnt be if it is using the chromedriver.exe – Deployd Oct 04 '21 at 20:14
  • @Deployd Googling this issue produces this: https://stackoverflow.com/questions/60296873/sessionnotcreatedexception-message-session-not-created-this-version-of-chrome/62127806 Does this not answer your question? – Libra Oct 04 '21 at 20:15