{"id":16189671,"url":"https://github.com/stuk/q-wd","last_synced_at":"2025-04-07T14:18:15.713Z","repository":{"id":5686162,"uuid":"6896453","full_name":"Stuk/q-wd","owner":"Stuk","description":"obsolete – see https://github.com/Stuk/wd instead","archived":false,"fork":false,"pushed_at":"2012-11-28T04:53:54.000Z","size":156,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T16:47:21.980Z","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/Stuk.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-11-28T04:50:22.000Z","updated_at":"2014-01-19T06:31:22.000Z","dependencies_parsed_at":"2022-09-05T06:31:22.627Z","dependency_job_id":null,"html_url":"https://github.com/Stuk/q-wd","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/Stuk%2Fq-wd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stuk%2Fq-wd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stuk%2Fq-wd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stuk%2Fq-wd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stuk","download_url":"https://codeload.github.com/Stuk/q-wd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666016,"owners_count":20975788,"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-10T07:36:21.888Z","updated_at":"2025-04-07T14:18:15.685Z","avatar_url":"https://github.com/Stuk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# q-wd.js - A light weight WebDriver/Se2 client for node.js\n\n[admc/q](https://github.com/admc/wd) adapted to use promises from [Q](https://github.com/kriskowal/q)\n\n## Authors\n\n  - Adam Christian ([admc](http://github.com/admc))\n  - Ruben Daniels ([javruben](https://github.com/javruben))\n  - Peter Braden ([peterbraden](https://github.com/peterbraden))\n  - Stuart Knightley ([Stuk](https://github.com/Stuk))\n\n## Usage\n\n```javascript\nvar webdriver = require(\"q-wd\")\n\nvar browser = webdriver.remote();\nbrowser.init({browserName:\"firefox\"}).then(function() {\n  return browser.get(\"http://www.jelly.io\");\n}).then(function() {\n  return browser.eval(\"window.location.href\");\n}).then(function(o) {\n  console.log(o);\n  return browser.get(\"http://www.seleniumhq.org\");\n}).then(function() {\n  return browser.quit();\n}).then(function() {\n  console.log(\"DONE\");\n});\n```\n\n## Supported Methods\n\n```\n  - 'close': Close the browser\n  - 'quit': Quit the session\n  - 'eval': Eval JS and return the value (takes a code string)\n  - 'execute': Eval JS (takes a code string)\n  - 'executeAsync': Execute JS in an async way (takes a code string)\n  - 'get': Navigate the browser to the provided url (takes a URL)\n  - 'setWaitTimeout': Set the implicit wait timeout in milliseonds (takes wait time in ms)\n  - 'element': Access an element in the page (takes 'using' and 'value' so ex: 'id', 'idofelement')\n  - 'moveTo': Move an element on the page (takes element, xoffset and yoffset'\n  - 'scroll': Scroll on an element (takes element, xoffset, yoffset)\n  - 'buttonDown': Click and hold the left mouse button down, at the coords of the last moveTo\n  - 'buttonUp': Release the left mouse button\n  - 'click': Click a mouse button, at the coords of the last moveTo (takes a button param for {LEFT = 0, MIDDLE = 1 , RIGHT = 2})\n  - 'doubleClick': Double click a mouse button, same coords as click\n  - 'type': Type! (takes an element, a key character, or an array of char keys)\n  - 'active': Get the element on the page currently with focus\n  - 'keyToggle': Press a keyboard key (takes an element and a key character'\n```\n\n## More docs!\n\nWD is simply implementing the Selenium JsonWireProtocol, for more details see the official docs: \u003ca href=\"http://code.google.com/p/selenium/wiki/JsonWireProtocol\"\u003ehttp://code.google.com/p/selenium/wiki/JsonWireProtocol\u003c/a\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuk%2Fq-wd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuk%2Fq-wd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuk%2Fq-wd/lists"}