
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
grunt-webdriver
Advanced tools
grunt-webdriver is a grunt plugin to run selenium tests with BusterJS and webdriverjs
grunt-webdriver is a grunt plugin to run selenium tests with BusterJS and webdriverjs
This plugin requires Grunt ~0.4.0
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-webdriver --save-dev
One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-webdriver');
In your project's Gruntfile, add a section named webdriver
to the data
object passed into grunt.initConfig()
.
Run this task with the grunt webdriver
command.
grunt.initConfig({
webdriver: {
dev: {
url: '<start-url>',
tests: ['<path-to-your-testfiles>']
}
},
})
Type: String
Default: chrome
Options: chrome | firefox | opera | safari | phantomjs
Defines the browser. If PhantomJS (>v1.8
) is installed, you
can run your Selenium tests in a headless browser. These tests are much faster as standard
browser tests.
Type: String
Default: dots
Options: dots | specification | quiet | xml | tap | html | teamcity
Reporters visualize progress and results of test runs. Some are desired for continious integration tests. Find more information in the BusterJS documentation.
Type: String
Default: silent
Options silent | verbose
Set log level of webdriverjs API
Type: String
Default: standard MacOSX browser path (e.g. Chrome: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
Specify the binary path for the indicated browser (important for windows user)
In this example, the minimum required options are used to execute a simple test script.
grunt.initConfig({
webdriver: {
dev: {
url: 'http://github.com',
tests: './test/github-test.js'
}
},
})
The corresponding Hello World test script, using webdriverjs API to search the grunt-webdriver repository on github. See more functions and test examples in the webdriverjs repository on GitHub.
'use strict';
var driver;
exports.name = "Hello World Test";
exports.tests = [{
name: "search plugin on github",
func: function(done) {
exports.driver
.click('.search a')
.setValue('.search-page-input','grunt-webdriver')
.click('#search_form .button')
.end(done);
}}
];
Please fork, add specs, and send pull requests! In lieu of a formal styleguide, take care to maintain the existing coding style.
FAQs
grunt-webdriver is a grunt plugin to run selenium tests with the WebdriverIO test runner
The npm package grunt-webdriver receives a total of 277 weekly downloads. As such, grunt-webdriver popularity was classified as not popular.
We found that grunt-webdriver demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.