How to use the geckodriver.path function in geckodriver

To help you get started, we’ve selected a few geckodriver 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 elastic / kibana / test / functional / services / remote / webdriver.ts View on Github external
const firefoxOptions = new firefox.Options();
        // Firefox 65+ supports logging console output to stdout
        firefoxOptions.set('moz:firefoxOptions', {
          prefs: { 'devtools.console.stdout.content': true },
        });
        if (headlessBrowser === '1') {
          // See: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode
          firefoxOptions.headless();
        }

        // Windows issue with stout socket https://github.com/elastic/kibana/issues/52053
        if (process.platform === 'win32') {
          const session = await new Builder()
            .forBrowser(browserType)
            .setFirefoxOptions(firefoxOptions)
            .setFirefoxService(new firefox.ServiceBuilder(geckoDriver.path))
            .build();
          return {
            session,
            consoleLog$: Rx.EMPTY,
          };
        }

        const { input, chunk$, cleanup } = await createStdoutSocket();
        lifecycle.on('cleanup', cleanup);

        const session = await new Builder()
          .forBrowser(browserType)
          .setFirefoxOptions(firefoxOptions)
          .setFirefoxService(
            new firefox.ServiceBuilder(geckoDriver.path).setStdio(['ignore', input, 'ignore'])
          )
github vuejs / vue-router / test / e2e / nightwatch.config.js View on Github external
module.exports = {
  src_folders: ['test/e2e/specs'],
  output_folder: 'test/e2e/reports',
  custom_commands_path: ['node_modules/nightwatch-helpers/commands'],
  custom_assertions_path: ['node_modules/nightwatch-helpers/assertions'],
  // set to true when testing on multiple browsers (-e chrome,firefox) to display tests as they pass instead of waiting for everything to be finished
  live_output: false,

  selenium: {
    start_process: true,
    server_path: require('selenium-server').path,
    host: '127.0.0.1',
    port: 4444,
    cli_args: {
      'webdriver.chrome.driver': require('chromedriver').path,
      'webdriver.gecko.driver': require('geckodriver').path
    }
  },

  test_settings: {
    default: {
      selenium_port: 4444,
      selenium_host: 'localhost',
      silent: true,
      screenshots: {
        enabled: true,
        on_failure: true,
        on_error: false,
        path: 'test/e2e/screenshots'
      },
      desiredCapabilities: {
        browserName: 'chrome',
github phiphou / webpack-vue-demo / config / nightwatch / nightwatch.js View on Github external
src_folders: [`${projectRoot}/test/e2e/`],
  output_folder: `${projectRoot}/reports/e2e/${utils.reportsDir}/`,
  custom_commands_path: '',
  custom_assrtions_path: '',
  page_objects_path: 'test/e2e/pages',
  globals_path: 'config/nightwatch/globals.js',
  selenium: {
    start_process: false,
    server_path: './node_modules/selenium-standalone/.selenium/selenium-server/2.53.1-server.jar',
    log_path: `${projectRoot}/reports/e2e/`,
    host: '127.0.0.1',
    port: 4444,
    silent: true,
    cli_args: {
      'webdriver.chrome.driver': require('chromedriver').path,
      'webdriver.gecko.driver': require('geckodriver').path
    }
  },
  // 'test_workers': {'enabled': true, 'workers': 'auto'},
  test_settings: {
    default: {
      launch_url: 'http://localhost',
      selenium_port: process.env.CIRCLE_ENV ? 80 : 4444,
      selenium_host: process.env.CIRCLE_ENV ? 'ondemand.saucelabs.com' : 'localhost',
      silent: true,
      screenshots: {
        enabled: true,
        path: projectRoot + `/reports/e2e/${utils.reportsDir}/screenshots`,
        on_failure: true,
        on_error: true
      },
      globals: {
github mucsi96 / nightwatch-api / packages / nightwatch-api / e2e-test-env / nightwatch.conf.js View on Github external
},
    chrome: {
      webdriver: {
        server_path: chromedriver.path,
        cli_args: ['--port=4444']
      },
      desiredCapabilities: {
        browserName: 'chrome',
        'goog:chromeOptions': {
          w3c: false
        }
      }
    },
    firefox: {
      webdriver: {
        server_path: geckodriver.path,
        cli_args: ['--port', '4444', '--log', 'debug']
      },
      desiredCapabilities: {
        browserName: 'firefox',
        marionette: true
      }
    }
  }
};
github pressbooks / pressbooks / e2e_tests / config / nightwatch.conf.js View on Github external
server_path: require('chromedriver').path,
				log_path: './e2e_tests/log'
			}
		},
		firefox: {
			desiredCapabilities : {
				browserName : 'firefox',
				acceptInsecureCerts: true,
				acceptSslCerts : true,
				ignoreProtectedModeSettings: true,
				unexpectedAlertBehaviour: 'accept'
			},
			webdriver: {
				start_process: true,
				port: 4444,
				server_path: require('geckodriver').path,
				log_path: './e2e_tests/log'
			}
		}
	}
};
github mucsi96 / nightwatch-api / packages / cucumber-example / nightwatch.conf.js View on Github external
webdriver: {
        server_path: chromedriver.path,
        cli_args: ['--port=4444']
      },
      desiredCapabilities: {
        browserName: 'chrome',
        javascriptEnabled: true,
        acceptSslCerts: true,
        chromeOptions: {
          args: ['disable-gpu']
        }
      }
    },
    firefox: {
      webdriver: {
        server_path: geckodriver.path,
        cli_args: ['--port', '4444', '--log', 'debug']
      },
      desiredCapabilities: {
        browserName: 'firefox',
        javascriptEnabled: true,
        acceptSslCerts: true,
        marionette: true
      }
    }
  }
};
github mucsi96 / nightwatch-api / packages / cucumber-selenium-example / nightwatch.conf.js View on Github external
const chromeDriver = require('chromedriver');
const geckoDriver = require('geckodriver');
const ieDriver = require('iedriver');
const edgeDriver = require('edgedriver');

module.exports = {
  custom_assertions_path: 'custom-assertions',
  test_settings: {
    default: {
      selenium: {
        start_process: true,
        server_path: seleniumServer.path,
        port: 4444,
        cli_args: {
          'webdriver.chrome.driver': chromeDriver.path,
          'webdriver.gecko.driver': geckoDriver.path,
          'webdriver.ie.driver': ieDriver.path,
          'webdriver.edge.driver': edgeDriver.path
        }
      }
    },
    chromeHeadless: {
      desiredCapabilities: {
        browserName: 'chrome',
        'goog:chromeOptions': {
          w3c: false,
          args: ['--headless']
        }
      }
    },
    chrome: {
      desiredCapabilities: {
github mucsi96 / nightwatch-api / packages / cucumber-selenium-hub-example / nightwatch.conf.js View on Github external
module.exports = {
  test_settings: {
    default: {
      selenium: process.env.containerized
        ? {
            port: 4444,
            host: 'selenium-hub'
          }
        : {
            port: 4444,
            start_process: true,
            server_path: seleniumServer.path,
            cli_args: {
              'webdriver.chrome.driver': chromeDriver.path,
              'webdriver.gecko.driver': geckoDriver.path,
              'webdriver.ie.driver': ieDriver.path,
              'webdriver.edge.driver': edgeDriver.path
            }
          }
    },
    chromeHeadless: {
      desiredCapabilities: {
        browserName: 'chrome',
        'goog:chromeOptions': {
          w3c: false,
          args: ['--headless']
        }
      }
    },
    chrome: {
      desiredCapabilities: {
github intoli / remote-browser / src / launchers.js View on Github external
export const launchFirefox = async (connectionUrl, sessionId = 'default') => {
  const driver = await new Builder()
    .forBrowser('firefox')
    .setFirefoxOptions(new firefox.Options()
      .headless())
    .setFirefoxService(new firefox.ServiceBuilder(geckodriver.path))
    .build();

  const command = new Command('install addon')
    .setParameter('path', extension)
    .setParameter('temporary', true);
  await driver.execute(command);

  const fileUrl = constructFileUrl(connectionUrl, sessionId);
  await driver.get(fileUrl);

  return driver;
};
github nasa-gibs / worldview / nightwatch.conf.js View on Github external
const chromedriver = require('chromedriver');
const geckodriver = require('geckodriver');
const files = './e2e/features';
module.exports = {
  output_folder: 'e2e/reports',
  globals_path: 'e2e/globals.js',
  custom_assertions_path: ['e2e/custom-assertions'],
  src_folders: files,
  selenium: {
    start_process: true,
    server_path: seleniumServer.path,
    port: 4444,
    check_process_delay: 5000,
    cli_args: {
      'webdriver.chrome.driver': chromedriver.path,
      'webdriver.gecko.driver': geckodriver.path,
      'webdriver.firefox.profile': 'nightwatch',
      'webdriver.gecko.profile': 'nightwatch'
    }
  },
  test_settings: {
    default: {
      launch_url: 'http://localhost',
      selenium_port: 4444,
      selenium_host: 'localhost',
      marionette: true
    },
    chrome: {
      desiredCapabilities: {
        browserName: 'chrome',
        'goog:chromeOptions': {
          w3c: false,

geckodriver

Mozilla's Geckodriver for Node.js

MPL-2.0
Latest version published 22 days ago

Package Health Score

71 / 100
Full package analysis