{"id":20630201,"url":"https://github.com/macacajs/wd.py","last_synced_at":"2025-04-15T18:19:54.955Z","repository":{"id":52705453,"uuid":"65268902","full_name":"macacajs/wd.py","owner":"macacajs","description":"Python Client binding for Macaca","archived":false,"fork":false,"pushed_at":"2021-04-20T17:13:30.000Z","size":381,"stargazers_count":33,"open_issues_count":2,"forks_count":10,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-28T23:21:40.254Z","etag":null,"topics":["macaca","python","webdriver"],"latest_commit_sha":null,"homepage":"https://macacajs.github.io/wd.py/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/macacajs.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.rst","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-09T06:27:56.000Z","updated_at":"2023-11-22T03:59:13.000Z","dependencies_parsed_at":"2022-08-22T09:20:40.458Z","dependency_job_id":null,"html_url":"https://github.com/macacajs/wd.py","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/macacajs%2Fwd.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macacajs%2Fwd.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macacajs%2Fwd.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/macacajs%2Fwd.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/macacajs","download_url":"https://codeload.github.com/macacajs/wd.py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804824,"owners_count":21164135,"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":["macaca","python","webdriver"],"created_at":"2024-11-16T14:07:10.835Z","updated_at":"2025-04-15T18:19:54.930Z","avatar_url":"https://github.com/macacajs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Macaca Python Client\n====================\n\n.. image:: https://img.shields.io/coveralls/macacajs/wd.py/master.svg?style=flat-square\n    :target: https://coveralls.io/github/macacajs/wd.py\n\n.. image:: https://img.shields.io/travis/macacajs/wd.py/master.svg?style=flat-square\n    :target: https://travis-ci.org/macacajs/wd.py\n\n.. image:: https://img.shields.io/pypi/v/wd.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/wd\n\n.. image:: https://img.shields.io/pypi/pyversions/wd.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/wd/\n\n.. image:: https://img.shields.io/pypi/dd/wd.svg?style=flat-square\n    :target: https://pypi.python.org/pypi/wd/\n\nIntro\n-----\n\nWD.py is a Python WebDriver client implemented most of the APIs in the `WebDriver Protocol \u003chttps://www.w3.org/TR/webdriver/\u003e`_.\nIt was originally designed for `Macaca \u003c//macacajs.github.io\u003e`_ (A Node.js powered WebDriver server), but also available for any other implementation of WebDriver server\nsuch as Selenium, Appium and etc.\n\nHomepage\n--------\n`WD.py’s documentation. \u003c//macacajs.github.io/wd.py/\u003e`_\n\nSample\n------\n`WD.py’s sample. \u003c//github.com/macaca-sample/macaca-test-sample-python/\u003e`_\n\nExamples\n--------\n.. code-block:: python\n\n    \u003e\u003e\u003e from macaca import WebDriver, WebElement\n\n    # Configure the desired capabilities.\n    \u003e\u003e\u003e desired_caps = {\n        'autoAcceptAlerts': True,\n        'browserName': 'electron',\n        'platformName': 'desktop'\n    }\n\n    \u003e\u003e\u003e driver = WebDriver(desired_caps)\n\n    # Start the WebDriver session\n    \u003e\u003e\u003e driver.init()\n\n    # Support fluent API\n    \u003e\u003e\u003e driver.set_window_size(1280, 800).get(\"https://www.google.com\")\n\n    # Get WebElement instance through element_by_* APIs.\n    \u003e\u003e\u003e web_element = driver.element_by_id(\"lst-ib\")\n    \u003e\u003e\u003e print(type(web_element))\n    macaca.webelement.WebElement\n\n    # WebElement include methods such as send_keys, click, get_attribute and etc.\n    \u003e\u003e\u003e web_element.send_keys(\"macaca\")\n    \u003e\u003e\u003e web_element = driver.element_by_name(\"btnK\")\n    \u003e\u003e\u003e web_element.click()\n\n    # WebDriver also has some properties like source, title and current_url.\n    \u003e\u003e\u003e html = driver.source\n    \u003e\u003e\u003e print('Does Macaca exist: ', 'macaca' in html)\n    Does Macaca exist: True\n    \u003e\u003e\u003e title = driver.title\n    \u003e\u003e\u003e print(title)\n    macaca - Google Search\n\nChangelog\n---------\nDetails changes for each release are documented in the `HISTORY.rst \u003cHISTORY.rst\u003e`_.\n\nContributing\n------------\n\n`See CONTRIBUTING.rst \u003c./CONTRIBUTING.rst\u003e`_\n\nLicense\n-------\n`MIT \u003chttp://opensource.org/licenses/MIT\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacacajs%2Fwd.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmacacajs%2Fwd.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmacacajs%2Fwd.py/lists"}