[Python] Selenium use of Firefox profile

Discussão em 'Python' iniciado por Stack, Setembro 11, 2025.

  1. Stack

    Stack Membro Participativo

    I try to use Selenium Webdriver and Python on Windows 10 system to make some automation of browser actions. But I have this problem: Selenium-started Firefox window doesn't "see" that I am already logged in and target site sends me to login page. So I assumed that Selenium not really uses the profile, but just a copy of it.

    I would like to know:

    1. Is my conclusion about actual use of copy of profile true?
    2. If 1. is true, is there a way to use really everything from existing profile?
    3. If my conclusion is not true, please prove it and point me to the direction where I can find out what information can be used for session, why Selenium could fail to send it and how to force it to do so actually.

    Edit:

    from selenium import webdriver
    fp = webdriver.FirefoxProfile('C:/Users/<user name>/AppData/Roaming/Mozilla/Firefox/Profiles/abc3defghij2.ProfileName')
    driver = webdriver.Firefox(fp)
    driver.get("https://www.example.com/membersarea")

    Continue reading...

Compartilhe esta Página