{"id":17398941,"url":"https://github.com/cdata/burnout","last_synced_at":"2025-04-15T16:21:54.658Z","repository":{"id":3230491,"uuid":"4266403","full_name":"cdata/burnout","owner":"cdata","description":"Burnout is an asynchronous, chainable and DRY interface for building Selenium 2 WebDriver scripts in Node.","archived":false,"fork":false,"pushed_at":"2012-05-15T22:40:29.000Z","size":102,"stargazers_count":15,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T22:12:57.633Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-05-08T23:02:52.000Z","updated_at":"2018-12-31T13:58:07.000Z","dependencies_parsed_at":"2022-07-10T20:31:13.504Z","dependency_job_id":null,"html_url":"https://github.com/cdata/burnout","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdata%2Fburnout","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdata%2Fburnout/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdata%2Fburnout/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdata%2Fburnout/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdata","download_url":"https://codeload.github.com/cdata/burnout/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248402618,"owners_count":21097331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T15:03:40.261Z","updated_at":"2025-04-15T16:21:54.639Z","avatar_url":"https://github.com/cdata.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Burnout\n\nBurnout is an asynchronous, chainable and DRY interface for building Selenium 2 WebDriver scripts in Node. It was written primarily for interfacing with Sauce Labs, but it should work with most Selenium 2 setups. Burnout builds on top of the excellent Selenium 2 WebDriver library [wd][1].\n\n## Installing\n\n```sh\nnpm install burnout\n```\n\n## Using\n\nBurnout's API strives to map as closely as possible to the interface exposed by [wd][1], which in turn maps closely to the Selenium [JSON Wire Protocol][2].\n\nAn example test:\n\n```javascript\nvar burnout = require('burnout'),\n    assert = require('assert'); // Your assertion utility of choice here\n\nburnout\n    .initialize({ \n        name: \"CloudFlare - Rocket Loader Optimization\" // Test name\n    })\n    // Callbacks are optional..\n    .get(\"http://www.google.com/\")\n    // Commands can be chained..\n    .eval(\"document.title\", function(title) {\n\n        // Failed assertions will stop the test on a per-browser basis..\n        assert(title == 'Google');\n    })\n    // Chained commands are guaranteed to run synchronously..\n    .elementByCss(\"#NextPageLink\", function(link) {\n\n        // The context of callbacks can be used to promise sub-commands..\n        return this.moveTo(link, 2, 2, function() {\n\n            return this.click(link)\n        });\n    })\n    // End the test. Status automatically posted to Sauce Labs.\n    .quit();\n```\n\n## API\n\nThese are the methods currently exposed by Burnout:\n\n```javascript\nvar seleniumMethods = [\n    'init',\n    'get',\n    'eval',\n    'element',\n    'elementById',\n    'elementByName',\n    'elementByCss',\n    'getAttribute',\n    'execute',\n    'executeAsync',\n    'click',\n    'doubleClick',\n    'close',\n    'setImplicitWaitTimeout',\n    'setAsyncScriptTimeout',\n    'moveTo',\n    'scroll',\n    'text',\n    'buttonDown',\n    'buttonUp',\n    'active',\n    'keyToggle'\n];\n```\n\n## Browsers\n\nBurnout uses a hardcoded selection of browsers when running tests. Exclusions to this selection are currently supported, but not additions. This will change as I get a feel for how people are using the library, but for my immediate purposes I wanted tests to be inclusive by default.\n\nThese are the browsers that Burnout tests by default:\n\n```javascript\nvar seleniumBrowsers = [\n    {\n        browserName: \"googlechrome\"\n    },\n    {\n        browserName: \"firefox\",\n        version: \"11\",\n        platform: \"XP\"\n    },\n    {\n        browserName: \"firefox\",\n        version: \"3.6\",\n        platform: \"XP\"\n    },\n    {\n        browserName: \"iexplore\",\n        version: \"6\",\n        platform: \"XP\"\n    },\n    {\n        browserName: \"iexplore\",\n        version: \"7\",\n        platform: \"XP\"\n    },\n    {\n        browserName: \"iexplore\",\n        version: \"8\",\n        platform: \"XP\"\n    },\n    {\n        browserName: \"iexplore\",\n        version: \"9\"\n    },\n    {\n        browserName: \"opera\",\n        version: \"11\",\n        platform: \"LINUX\"\n    }\n];\n```\n\nIf you want to exclude specific browsers from you test, you can specify them when you initialize Burnout:\n\n```javascript\nburnout\n    .initialize({\n        name: \"Foo test.\",\n        exclude: [\n            \"iexplore 6\",\n            \"firefox 3.6\"\n        ]\n    })\n    // etc..\n```\n\nIf you just want to sanity check your code, you can set an environment variable when running your tests:\n\n```sh\n# If $ENV is set to test, only Google Chrome will be tested\nENV=test node ./path/to/selenium-suite.js\n```\n\nAlternatively, you can set 'debug' to true when initializing Burnout:\n\n```javascript\nburnout\n    .initialize({ \n        name: \"Foo test.\", \n        debug: true \n    })\n    // etc..\n```\n\n## Sauce Labs\n\nBurnout accepts Sauce Labs account information as environment variables:\n\n```sh\nSAUCE_USER=foo SAUCE_KEY=123-456-789 node ./path/to/selenium-suite.js\n```\n\nOr as options in the call to initialize:\n\n```javascript\nburnout\n    .initialize({\n        name: \"Foo test.\",\n        sauceUser: \"foo\",\n        sauceKey: \"123-456-789\"\n    })\n    // etc..\n```\n\n## Non-Sauce Labs Environments\n\nBurnout also accepts a custom hostname and port for your local environment:\n\n```javascript\nburnout\n    .initialize({\n        name: \"Foo test.\",\n        remoteHost: \"ondemand.saucelabs.com\",\n        remotePort: 80\n    })\n    // etc..\n```\n\n[1]: http://github.com/admc/wd\n[2]: http://code.google.com/p/selenium/wiki/JsonWireProtocol\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdata%2Fburnout","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdata%2Fburnout","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdata%2Fburnout/lists"}