{"_id":"buster-selenium","_rev":"34-aa1bd9b4f8ee0eaacbd67e87e0a62ef8","name":"buster-selenium","description":"Buster.js extension to work with selenium-webdriver, wd, or webdriverio.","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.0":{"name":"buster-selenium","version":"0.0.0","description":"Buster.js extension to work with selenium-webdriver or wd.","scripts":{"test":"node_modules/.bin/buster-test"},"repository":"","author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"license":"MIT","dependencies":{"selenium-webdriver":"~2.35.2","wd":"~0.1.5"},"devDependencies":{"buster":"~0.7.6","phantomjs":"~1.9.2-2","buster-configuration":"~0.7.1"},"engines":{"node":"~0.8"},"_id":"buster-selenium@0.0.0","dist":{"shasum":"fcae5b002b5d4345abe84fd1e10cc2789bb945aa","tarball":"https://registry.npmjs.org/buster-selenium/-/buster-selenium-0.0.0.tgz","integrity":"sha512-pkznYf8JFVTQFB2tNUvVx+MYsI3nakvQWRwYzQUL3B/lLFkVGyA0Z0Gjn/ZfhBCUyHfnsg5GkO99PO7W+jM3RQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFy92olqgA3xzodIikTDOUSvsrAYrpJqBrCequ3NPB9EAiAUVEDuFUbhxsEY1lsxjm0wHwalttYIxLahQZj7xzsAHg=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},"maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"}],"directories":{}},"0.0.1":{"name":"buster-selenium","version":"0.0.1","description":"Buster.js extension to work with selenium-webdriver or wd.","keywords":["buster","selenium","webdriver","wd"],"scripts":{"test":"node_modules/.bin/buster-test"},"repository":"","author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"license":"MIT","dependencies":{"selenium-webdriver":"~2.35.2","wd":"~0.1.5"},"devDependencies":{"buster":"~0.7.6","phantomjs":"~1.9.2-2","buster-configuration":"~0.7.1"},"engines":{"node":"~0.8"},"_id":"buster-selenium@0.0.1","dist":{"shasum":"90f85a8890d7735d6887f2cce9e063f42c691d21","tarball":"https://registry.npmjs.org/buster-selenium/-/buster-selenium-0.0.1.tgz","integrity":"sha512-NVjzPJOFXPZnzLQikaUT+rlY9Kryh7kSXCsa+7S+YA3uJqYUJu1D9mfWJvj6xKFRbEvfx9MYXs3TP6OYCYpNsA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFEbnpVkJtsDFNmD4/kbRptmK4kU9h9E9vc4RjFWVXxBAiBfNKX8qbdS7HPCHIY+Hw/HuESMvvwqStYWMV8i7NCztQ=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},"maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"}],"directories":{}},"0.0.2":{"name":"buster-selenium","version":"0.0.2","description":"Buster.js extension to work with selenium-webdriver, wd, or webdriverjs.","keywords":["buster","selenium","webdriver","wd","webdriverjs"],"scripts":{"test":"node_modules/.bin/buster-test"},"repository":"","author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"license":"MIT","dependencies":{"selenium-webdriver":"~2.35.2","wd":"~0.1.5","webdriverjs":"~0.7.14"},"devDependencies":{"buster":"~0.7.6","phantomjs":"~1.9.2-2","buster-configuration":"~0.7.1"},"engines":{"node":"~0.8"},"_id":"buster-selenium@0.0.2","dist":{"shasum":"89be868afdc53baf2c18b80ccf88bbf7ff0418cb","tarball":"https://registry.npmjs.org/buster-selenium/-/buster-selenium-0.0.2.tgz","integrity":"sha512-G+lct8AsKqF4YE4OPZdwrGLKX6MQjs2stJRtYk9Gw/jui137BCgZvPFr7s7WkY9v+l5+/pzDb5j1Lbs5HzPpwg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBXWu02WKdmoRzIt7lyFR631Kh3apL3neJuKnQolm0O2AiAOYy2WVIWK3PEepuV6Z2ir309Fbh5tXV/mOPyjI7expA=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},"maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"}],"directories":{}},"0.0.3":{"name":"buster-selenium","version":"0.0.3","description":"Buster.js extension to work with selenium-webdriver, wd, or webdriverjs.","keywords":["buster","selenium","webdriver","wd","webdriverjs"],"scripts":{"test":"node_modules/.bin/buster-test"},"main":"./lib/buster-selenium","repository":{"type":"git","url":"https://github.com/GCheung55/buster-selenium"},"author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"license":"MIT","dependencies":{"selenium-webdriver":"~2.35.2","wd":"~0.1.5","webdriverjs":"~0.7.14"},"devDependencies":{"buster":"~0.7.6","phantomjs":"~1.9.2-2","buster-configuration":"~0.7.1"},"engines":{"node":"~0.8"},"_id":"buster-selenium@0.0.3","dist":{"shasum":"f9380397814d23ddacdcf57842d1e50fa0150f8c","tarball":"https://registry.npmjs.org/buster-selenium/-/buster-selenium-0.0.3.tgz","integrity":"sha512-n/rg3BK1FjlYpdGvoBgWhETuJ2Ki/0+p8CCFP4lr9D7c6Xkuq7IgT43dv7qpVjm/kxfpCr0Jx1Xpd6I8aESY7Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClYg2QzHA2jQ5FGYZL3lmqye2ZGNIO/vgRb0/fSUE0qAiEA5apM8wgW52igfylSu+UyuLmcVyJvf5Qei5o2myzP0mQ="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},"maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"}],"directories":{}},"0.0.4":{"name":"buster-selenium","version":"0.0.4","description":"Buster.js extension to work with selenium-webdriver, wd, or webdriverjs.","keywords":["buster","selenium","webdriver","wd","webdriverjs"],"scripts":{"test":"node_modules/.bin/buster-test"},"main":"./lib/buster-selenium","repository":{"type":"git","url":"https://github.com/GCheung55/buster-selenium"},"author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"license":"MIT","dependencies":{"selenium-webdriver":"~2.35.2","wd":"~0.1.5","webdriverjs":"~0.7.14"},"devDependencies":{"buster":"~0.7.6","phantomjs":"~1.9.2-2","buster-configuration":"~0.7.1"},"engines":{"node":"~0.8"},"_id":"buster-selenium@0.0.4","dist":{"shasum":"b7c7be4cbd189930e6e2f53d5e2a52c385c264e7","tarball":"https://registry.npmjs.org/buster-selenium/-/buster-selenium-0.0.4.tgz","integrity":"sha512-VfzaNjsh8UN6hTasFfENRiMPyjiH7zKGvWS+uErYwaVVxAICSeMT7V5U0jQObySErywcEu++VkRrFYeZTwUJUA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1Ndayiov4t+oMjCQlfQvAzpjLaMYXP/M5Ss6OKvIspAiAlo1mu3fkQA1XTwdlcerHjj0sT7P6hYFs7MfNFKH2UCg=="}]},"_npmVersion":"1.1.62","_npmUser":{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},"maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"}],"directories":{}},"0.0.5":{"name":"buster-selenium","version":"0.0.5","description":"Buster.js extension to work with selenium-webdriver, wd, or webdriverjs.","keywords":["buster","selenium","webdriver","wd","webdriverjs"],"scripts":{"test":"node_modules/.bin/buster-test"},"main":"./lib/buster-selenium","repository":{"type":"git","url":"https://github.com/GCheung55/buster-selenium"},"author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"license":"MIT","dependencies":{"selenium-webdriver":">=2.37.0","wd":">=0.2.3","webdriverjs":">=0.7.14"},"devDependencies":{"buster":">=0.7.6","phantomjs":">=1.9.2-2","buster-configuration":">=0.7.1"},"engines":{"node":">=0.8"},"bugs":{"url":"https://github.com/GCheung55/buster-selenium/issues"},"_id":"buster-selenium@0.0.5","dist":{"shasum":"8581bcebd399cb79811acb5c6770a5480c3506c1","tarball":"https://registry.npmjs.org/buster-selenium/-/buster-selenium-0.0.5.tgz","integrity":"sha512-Wr477qtnuoY2li9yNVBNeo5JS/8kHAhQnQAPbigjZnliLIaVKQHcK7KWOM2x0Ge3hYmaWfZ3jdgG98t8QAxKAg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRo/OMXdZaFMI/dLfHlJD65a57vUUegERJmLWYw8OTCAiEA5P1qYdg/YORB6IfWVXWW1np7QmdQ59/lIE6FfsW1jBI="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},"maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"}]},"0.0.6":{"name":"buster-selenium","version":"0.0.6","description":"Buster.js extension to work with selenium-webdriver, wd, or webdriverio.","keywords":["buster","selenium","webdriver","wd","webdriverio"],"scripts":{"test":"buster-test"},"main":"./lib/buster-selenium","repository":{"type":"git","url":"https://github.com/GCheung55/buster-selenium"},"author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"license":"MIT","dependencies":{"selenium-webdriver":">=2.37.0","wd":">=0.2.3","webdriverio":">=2.1.0"},"devDependencies":{"buster":">=0.7.6","buster-configuration":">=0.7.1","phantomjs":">=1.9.2-2","selenium-standalone":"^2.42.0-2.9.0"},"engines":{"node":">=0.8"},"gitHead":"d76587c52501187ba68ff9efc8233c0e3856add8","bugs":{"url":"https://github.com/GCheung55/buster-selenium/issues"},"homepage":"https://github.com/GCheung55/buster-selenium","_id":"buster-selenium@0.0.6","_shasum":"84e0dbc6c7e16f073009d81acb3ff00df7e7ffdd","_from":".","_npmVersion":"1.4.13","_npmUser":{"name":"garrickcheung","email":"garrick@garrickcheung.com"},"maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},{"name":"garrickcheung","email":"garrick@garrickcheung.com"}],"dist":{"shasum":"84e0dbc6c7e16f073009d81acb3ff00df7e7ffdd","tarball":"https://registry.npmjs.org/buster-selenium/-/buster-selenium-0.0.6.tgz","integrity":"sha512-pUvUup7xEYxM2HDqzBIorphPByXhutBVTejuHE5x/0nP7RwS5drzWNYgQzLKkIwT51Sm4/IGr3SXhpkS6ec/7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEpDSgLYkkJKvXoCVVVsAu+zU+IMNEel9h2J8IaWAIrEAiEAybtj+rOio+FtVTQeBAw/0Che46SpywJm7lOEHfdBens="}]}}},"readme":"# buster-selenium\n\n[![Build Status](https://travis-ci.org/GCheung55/buster-selenium.png)](https://travis-ci.org/GCheung55/buster-selenium)\n\nAn extension for [buster.js](http://busterjs.org) to make it easy to write functional tests with either [selenium-webdriver](https://npmjs.org/package/selenium-webdriver), [wd](https://npmjs.org/package/wd), and [webdriverio](https://npmjs.org/package/webdriverio).\n\n**This extensions is only for tests run in node environment.**\n\n## Install\n\nInstallation is done using npm:\n\n```bash\n$ npm install buster-selenium\n```\n\n## Usage\n\nAdd `buster-selenium` extension and corresponding options, to the buster.js config file:\n\n```javascript\nvar config = module.exports;\n\nconfig[\"Browser tests\"] = {\n    rootPath: \"../\",\n    tests: [\"test/**/*.js\"],\n    extensions: [require('buster-selenium')],\n    'buster-selenium': {\n        // required, can be either selenium-webdriver or wd\n        driver: 'selenium-webdriver'\n    }\n}\n```\n\nWrite the tests! Please check the documentation of the webdriver module you choose to use. Remember to quit the browser!\n\n```javascript\nvar buster = require('buster');\n\nbuster.testCase('goToGoogle', {\n    'Load google.com': function(){\n        var browser = this.webdriver.browser();\n\n        return browser.get('http://www.google.com').then(function(){\n            return browser.getTitle();\n        }).then(function(title) {\n            assert.equals(title, 'Google');\n        }).then(function(){\n            browser.quit();\n        });\n    }\n});\n\n```\n\nGo check out [Examples](https://github.com/GCheung55/buster-selenium/tree/master/examples/test) of how to setup `buster.js` config and tests.\n\n## Configuration\n\n* `driver` - (*string* or *function*) - required, choose `selenium-webdriver`, `wd`, or `webdriverio` strings or define a function that returns anything you want to use as the driver.\n* `config` - (*object*) - optional, configuration for the webdriver library. Each library is slightly different.\n* `timeout` - (*number*) - optional, defaults to 10000. Define how long a test runs before it timesout. Extend the time of your tests if the webdriver-driven browser takes a really long time to complete tasks.\n\n#### Example\n\n```javascript\n{\n    driver: function(config){\n        return new require('someOtherWebdriver')(config);\n    },\n    config: {\n        exampleOption: true,\n        exampleOption2: false\n    }\n}\n```\n\n### selenium-webdriver `config`\n\n* `server` - (*string*) - url to the Selenium Server/Hub.\n* `desiredCapabilities` - (*object*) - define capabilities for the browser\n\n**Note: If `phantomjs` is not found in `$PATH` variable, it may be necessary to define the path in `desiredCapabilities`.**\n\n#### Example\n```javascript\n{\n    server: 'http://localhost:4444',\n    desiredCapabilities: {\n        browserName: 'phantomjs',\n        'phantomjs.binary.path': './node_modules/.bin/phantomjs'\n    }\n}\n```\n\n### wd `config`\n\n* `server` - (*string* or *object*) - url or parameters to the Selenium Server/Hub. Check [wd browser-initialization docs](https://github.com/admc/wd#browser-initialization) for examples\n* `desiredCapabilities` - (*object*) - define capabilities for the browser\n\n**Note: Defining path to `phantomjs` is not necessary.**\n\n#### Example\n```javascript\n{\n    server: 'http://localhost:444',\n    desiredCapabilities: {\n        browserName: 'phantomjs'\n    }\n}\n```\n\n### webdriverio `config`\n\nRefer to [webdriverio options docs](https://github.com/webdriverio/webdriverio#options) for an explanation of the `config` options.\n\n**Consider setting `logLevel` property to \"silent\" when using `xml` reporter.**\n\n#### Example (taken from a [webdriverio example](https://github.com/webdriverio/webdriverio/tree/master/examples))\n```javascript\n{\n    desiredCapabilities: {\n        browserName: 'chrome',\n        version: '27',\n        platform: 'XP'\n    },\n    host: 'hub.browserstack.com',\n    port: 80,\n    user : process.env.BROWSERSTACK_USERNAME,\n    key: process.env.BROWSERSTACK_ACCESS_KEY,\n    logLevel: 'silent',\n}\n```\n\n## Usage\n\nEvery test will be extended with a `webdriver` object with access to two properties.\n\n* `driver` - (*object*) - The `require`'d webdriver node module. Ex. require('wd'); or require('selenium-webdriver');\n* `browser` - (*function*) - A wrapper function around the webdrivers browser builder/initializer. Returns a browser session object with the `desiredCapbilities` config.\n\n### Example\n\n```javascript\n// assume we are using selenium-webdriver\nbuster.testCase('google', {\n    setUp: function(){\n        // Get a browser session\n        this.browser = this.webdriver.browser();\n    },\n\n    tearDown: function(){\n        // Quit the browser session, you should clean up every time\n        this.browser.quit();\n    },\n\n    'go to google.com': function(){\n        // Go to the google webpage and assert that its true\n        // Buster tests can accept promises!\n        return browser.get('http://www.google.com').then(function(){\n            assert(true);\n        })\n    }\n});\n```\n\n### Notes: `wd`\n\n`wd` provides three (at the time of this writing) types of remote/browser objects. A regular continuation style, a promise, and a promise chain. To access them, pass the `browser` function a string!\n\n```javascript\n// Give me the promise remote/browser!\nthis.browser = this.webdriver.browser('promise');\n\n// or\n\n// Give me the promise chain remote/browser!\nthis.browser = this.webdriver.browser('promiseChain');\n\n// or\n\n// Give me the regular continuation style remote/browser!\nthis.browser = this.webdriver.browser();\n```\n\nRefer to [`wd docs`](https://github.com/admc/wd) for more info.\n","maintainers":[{"name":"GarrickCheung","email":"garrick@garrickcheung.com"},{"name":"garrickcheung","email":"garrick@garrickcheung.com"}],"time":{"modified":"2022-06-13T05:20:02.981Z","created":"2013-10-16T18:29:04.427Z","0.0.0":"2013-10-16T18:29:05.260Z","0.0.1":"2013-10-16T20:12:00.951Z","0.0.2":"2013-10-17T01:57:49.756Z","0.0.3":"2013-10-17T05:42:50.463Z","0.0.4":"2013-10-17T06:29:25.182Z","0.0.5":"2013-11-13T21:30:42.151Z","0.0.6":"2014-08-19T06:12:19.768Z"},"author":{"name":"Garrick Cheung","email":"@GCheung55","url":"http://github.com/GCheung55"},"repository":{"type":"git","url":"https://github.com/GCheung55/buster-selenium"},"homepage":"https://github.com/GCheung55/buster-selenium","keywords":["buster","selenium","webdriver","wd","webdriverio"],"bugs":{"url":"https://github.com/GCheung55/buster-selenium/issues"},"license":"MIT","readmeFilename":"README.md"}