{"id":20077586,"url":"https://github.com/digitaledgeit/js-browserbot","last_synced_at":"2026-06-10T10:31:44.766Z","repository":{"id":23995667,"uuid":"27379236","full_name":"digitaledgeit/js-browserbot","owner":"digitaledgeit","description":"A library for programatically browsing websites.","archived":false,"fork":false,"pushed_at":"2016-02-07T23:25:44.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-27T22:42:46.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/digitaledgeit.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":"2014-12-01T12:49:33.000Z","updated_at":"2016-02-07T23:21:10.000Z","dependencies_parsed_at":"2022-08-22T02:00:40.425Z","dependency_job_id":null,"html_url":"https://github.com/digitaledgeit/js-browserbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/digitaledgeit/js-browserbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-browserbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-browserbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-browserbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-browserbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitaledgeit","download_url":"https://codeload.github.com/digitaledgeit/js-browserbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitaledgeit%2Fjs-browserbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34149132,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-11-13T15:09:05.947Z","updated_at":"2026-06-10T10:31:44.745Z","avatar_url":"https://github.com/digitaledgeit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# browserbot\n\nA library for programatically browsing websites.\n\nThis library takes many ideas from [NightmareJS](https://github.com/segmentio/nightmare) with one major difference - \nerrors stop the remaining queued actions from executing and return an error to the user.\n\n## Install\n\n    npm install --save browserbot\n\n## Usage\n    \nSend me an email:\n    \n    var browserbot = require('browserbot');\n    \n    new browserbot()\n        .go('http://www.digitaledgeit.com.au/contact/')\n        .waitForPageToLoad()\n        .type('input[name=firstName]',  'nodejs')\n        .type('input[name=lastName]',   'expert')\n        .type('input[name=email]',      'nodejs-expert@example.com')\n        .type('input[name=subject]',    'BrowserBot')\n        .type('textarea[name=message]', 'I really like BrowserBot, your PhantomJS wrapper!')\n        .click('input[type=submit]')\n        .waitForPageToLoad()\n        .screenshot('contact.png')\n        .run(function(err) {\n            console.log(err, 'Your email has been sent and your screenshot has been saved!');\n        })\n    ;\n\n## Plugins\n\nPlugins are just functions whom are passed the browserbot object and perform some functionality. Normally a plugin will \nqueue one or more commands.\n\n### Examples\n\n#### Authenticate a user by username and password\n\n    function authenticate(username, password) {\n        return function(browserbot) {\n            browserbot\n                .go('http://example.com/login')\n                .waitForPageToLoad()\n                .type('#username', username)\n                .type('#password', password)\n                .click('#login')\n                .waitForPageToLoad()\n            ;\n        };\n    }\n    \n    browserbot.use(authenticate('john.smith', 'i_love_JS!'));\n    \n    //now call other browserbot methods to browse authenticated pages\n    \n#### Disable CSS Transitions on pages that use Modernizr\n\n    function disableCSSTransitions(browserbot) {\n        browserbot.evaluate(function() {\n            document.body.classList.remove('csstransitions');\n        });\n    }\n    \n    browserbot.use(disableCSSTransitions);\n    \n    //now call other browserbot methods to browse pages with transitions disabled\n\n## API\n\n### browserbot() : Browserbot\n\n### .on()\n### .once()\n### .off()\n\n### .go()\n### .type()\n### .click()\n\n### .viewport(width, height)\n### .screenshot(path)\n\n### .wait(ms)\n### .waitForEvent(event)\n### .waitForPageToLoad()\n\n### .run()\n\n## TODO\n\n - better error messages e.g. when selectors are not found\n - add optional timeouts for wait functions\n - implement unfinished actions\n - use the same debug object\n - show resource errors\n - don't default SSL etc on\n \n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 James Newell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fjs-browserbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitaledgeit%2Fjs-browserbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitaledgeit%2Fjs-browserbot/lists"}