'opening a link using selenium in python

I am working on a selenium script to open a link. When I use the code below it works (this is when no google account is signed in).

driver = webdriver.Chrome()

driver.get('https://www.ebay.com/')

But when I add the short segment of code below in order to launch chrome with an account already signed in I am able to launch chrome and open it but the link does not open.

options = Options()

options.add_experimental_option("excludeSwitches", ["enable-automation"])

options.add_experimental_option('useAutomationExtension', False)

driver = webdriver.Chrome(options = options, executable_path= "C:\Program Files\Google\Chrome\Application\chrome.exe")

driver.get('https://www.ebay.com/')

I'm basically trying to launch chrome using selenium with my google account signed in and then open a link. I added the executable path argument in order to assign a port that selenium can launch on that is already signed into my google account. But by following the code above I cant open a link for some reason.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source