How can I use puppeteer/selenium to reuse the saved credentials/password when signing in a web site?

Viewed 817

As we know, we can't make chrome/firefox to autofill the password in the login form, but we can click the username/password pair in the "manage passwords" dialog so that the application doesn't need to input the password again.

The problem is: when we use puppeteer or selenium, we can't access the "manage passwords" dialog to fill in the password for us. Is there any solution for this problem?

1 Answers

You can use Brave browser executable that is based on chromumim and import passwords you have exported from chrome, and you run it like

const chromeExecPath = '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
const chromeUserDataDir = '/Users/XXX/Library/ApplicationSupport/Google/Chrome/Profile 2'


const braveExecPath = '/Applications/Brave Browser.app/Contents/MacOS/Brave Browser'
const braveUserDataDir = '/Users/XXX/Library/Application Support/BraveSoftware/Brave-Browser/Profile 1'



const puppeteer = require('puppeteer');
  puppeteer.launch({headless: false,
    args:['-enable-save-password-bubble'],
    executablePath: braveExecPath,
    userDataDir: braveUserDataDir}).then(async browser => {

Related