-1

This is the line of code I initiate the browser with:

browser = webdriver.Chrome(executable_path='C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe')

I use this because I want to have my regular browser etc. Otherwise I would have used:

browser = webdriver.Chrome(ChromeDriverManager().install())

Now, my problem is that when I use the method "browser.get('link')", it does not redirect the page to the specified link. (Which did not happen with the second line of code specified here!) What do you suggest I do to solve this problem? As I said, I am only after retaining the cookies etc.

1 Answers1

0

Through the key executable_path instead the absolute path of chrome.exe you need to pass the absolute path of ChromeDriver executable. So your effective line of code will be:

browser = webdriver.Chrome(executable_path='C:\\path\\to\\chromedriver\\chromedriver.exe')
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • But the problem I get then is my Chrome profile is not transferred! What should I do to fix this? – Delta Foxtrot Jan 07 '21 at 18:15
  • @DeltaFoxtrot Sounds like a completely different issue all together. Can you raise a new question as per your new requirement? Stackoverflow contributors will be happy to help you out. – undetected Selenium Jan 07 '21 at 18:16