How to use the firefox-profile.Finder function in firefox-profile

To help you get started, we’ve selected a few firefox-profile examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / web-ext / src / firefox / index.js View on Github external
export async function isDefaultProfile(
  profilePathOrName: string,
  ProfileFinder?: typeof FirefoxProfile.Finder = FirefoxProfile.Finder,
  fsStat?: typeof fs.stat = fs.stat,
): Promise {
  if (DEFAULT_PROFILES_NAMES.includes(profilePathOrName)) {
    return true;
  }

  const baseProfileDir = ProfileFinder.locateUserDirectory();
  const profilesIniPath = path.join(baseProfileDir, 'profiles.ini');
  try {
    await fsStat(profilesIniPath);
  } catch (error) {
    if (isErrorWithCode('ENOENT', error)) {
      log.debug(`profiles.ini not found: ${error}`);

      // No profiles exist yet, default to false (the default profile name contains a
      // random generated component).

firefox-profile

firefox profile for selenium WebDriverJs, admc/wd or any other node selenium driver that supports capabilities

MIT
Latest version published 18 days ago

Package Health Score

80 / 100
Full package analysis