I want to create a function that opens the browser, just to have it in a more compact way every time I need to call it, using Selenium Python. This the code:
def prepare_website():
chrome_driver = ChromeDriverManager().install()
driver = Chrome(service=Service(chrome_driver))
driver.maximize_window()
driver.get(some_link)
prepare_website()
The problem is that after executing it closes the browser. How to keep it open instead, as it actually would do if it were not in a function?