1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Selenium with Firefox + Saved Passwords?

Discussion in 'General Programming Chat' started by rodvan, Oct 5, 2016.

  1. rodvan

    rodvan Jr. VIP Jr. VIP

    Joined:
    Jul 27, 2010
    Messages:
    1,293
    Likes Received:
    492
    Occupation:
    developer, marketing, automation, machine learning
    Location:
    Wizard of Bots
    Home Page:
    Hello.. Im wondering if this works or someone has tried before.
    As you know (if you are answering) selenium is for testing on browser, so if you load a bot and do specific actions it will open Firefox and do what you specify.
    So the question here is:
    If I have a Windows 10 VPS working on, and I install Firefox and put all saved passwords for different websites just to click connect button using the saved passwords, or store cookies/cache/sessions, etc.

    When I open a new instance or run a script, will that remember all my records previously configured?
    For example, if I already connected to Facebook, and when the bot closes and then when it opens again, will it start a new session and forget the previous cookies?

    Thanks.
     
  2. kittykut

    kittykut Jr. VIP Jr. VIP

    Joined:
    Feb 9, 2016
    Messages:
    510
    Likes Received:
    223
    Gender:
    Male
    Location:
    localhost
    no, just tell your bot the username and password it should be simple
     
  3. zuix33

    zuix33 Junior Member

    Joined:
    Jan 3, 2016
    Messages:
    194
    Likes Received:
    65
    Gender:
    Male
    If you close driver ,it will forget the previous cookies so you need create profile or save them.
     
  4. MrBlue

    MrBlue Senior Member

    Joined:
    Dec 18, 2009
    Messages:
    970
    Likes Received:
    680
    Occupation:
    Web/Bot Developer
    You need to specify the correct Firefox profile in your Selenium session.

    Read more about it here:
    Code:
    http://www.guru99.com/firefox-profile-selenium-webdriver.html
     
    • Thanks Thanks x 1