[Python] Control already opened chrome browser using python

Discussão em 'Python' iniciado por Stack, Maio 15, 2025.

  1. Stack

    Stack Membro Participativo

    Using python I was able to control already opened chrome browser. previously i used to run chrome with below command


    "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222


    and in python


    from selenium import webdriver
    from selenium.webdriver.chrome.service import Service
    from selenium.webdriver.chrome.options import Options

    chrome_option = Options()
    service = Service()
    chrome_option.add_experimental_option("debuggerAddress", "localhost:9222")
    driver = webdriver.Chrome(service=service, options=chrome_option)
    url = "www.example.com"
    driver.get(url)


    But few days back code stopped working.

    Continue reading...

Compartilhe esta Página