I'm new to Selenieum and still trying to understand how the different pieces work together. I am trying to automate some interaction tasks on an internal website using Python. However, I am trying to use the existing Chrome browser session AFTER I've authenticated with my username and password rather than launching a new browser. I'd like to start where my browser is currently and I'd also like to use a separate profile when launching chrome as to not pollute the default Chrome browser (not sure this is necessary). The driver is currently on a folder on my desktop and I also created a variable ChromeDriver location in my PATH environment variable on my Mac but I am not sure that is really necessary. I also created I've researched several similar post and found the code below on SO, but when I run it still opens a new browser and drops me at the login screen.
from selenium import webdriver
PATH = 'where chrome driver is located'
driver = webdriver.Chrome(PATH)
url = driver.command_executor._url
session_id = driver.session_id
driver = webdriver.Remote(command_executor=url,desired_capabilities={})
driver.close()
driver.session_id = session_id
driver.get("https://whereidliketobeafterlogin")