{"id":17659744,"url":"https://github.com/raphamorim/capivara","last_synced_at":"2025-05-07T15:02:14.021Z","repository":{"id":62560835,"uuid":"53522514","full_name":"raphamorim/capivara","owner":"raphamorim","description":"[no longer maintained] Generates \u0026 Obtain DOM (Document Object Model)","archived":false,"fork":false,"pushed_at":"2016-06-26T12:32:50.000Z","size":405,"stargazers_count":5,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-27T06:49:23.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raphamorim.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-09T18:44:42.000Z","updated_at":"2020-10-28T22:26:36.000Z","dependencies_parsed_at":"2022-11-03T14:45:34.437Z","dependency_job_id":null,"html_url":"https://github.com/raphamorim/capivara","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/raphamorim%2Fcapivara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fcapivara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fcapivara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fcapivara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphamorim","download_url":"https://codeload.github.com/raphamorim/capivara/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902604,"owners_count":21822259,"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-23T16:08:10.018Z","updated_at":"2025-05-07T15:02:13.979Z","avatar_url":"https://github.com/raphamorim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Capivara.py (No longer maintained)\n=======================================\n\nGenerates \u0026 Obtain DOM (Document Object Model)\n\nCapivara is a library that allows your python obtain the DOM from webpages. Being a excelent tool to test client-side behavior.\n\n.. image:: https://raw.githubusercontent.com/raphamorim/capivara/master/resources/images/capivara.png\n    :target: #\n    \n\nInstallation\n============\n\nCustom Requirement: [Phantomjs binary package installed](http://phantomjs.org/download.html)\n\nTo install Capivara, simply run:\n\n.. code-block:: bash\n\n    $ pip install capivara\n\n\nUsage\n=====\n\n.. code-block:: html\n\n    \u003cdiv class=\"container main\"\u003e\n        You shall not pass!!\n    \u003c/div\u003e\n\n\n.. code-block:: python\n\n    import capivara\n    document = capivara.init(port=8012) # default = 8000\n\n    element = document.querySelector('.container')\n    assert.equal(element.className, \"container main\") # true\n    assert.equal(element.textContext, \"You shall not pass!!\") # true\n\n\nAvailable Methods\n=================\n\nquerySelector\n~~~~~~~~~~~~~\n\nReturns the first element that is a descendant of the element on which it is invoked that matches the specified group of selectors.\n\n.. code-block:: python\n\n    element = document.querySelector('.container')\n\n\nNotes\n=====\n\nThe capivara is unable to deliver all the properties of the element.\n\nHowever he can deliver the following properties:\n\n`style`, `classList`, `textContext`, `baseURI`, `className`, `clientHeight`, `clientLeft`, `clientTop`, `clientWidth`, `firstChild`, `title`, `string`, `tagName`, `tabIndex`, `outerHTML`, `localeString`, `localName`, `dir`, `scrollLeft`, `scrollHeight`, `scrollWidth`, `scrollTop`\n\nRoadmap\n=======\n\n- Read element propeties after a specified event\n- Support `addEventListener` method\n- Support elements methods (like `element.classList.add`, `element.innerHTML`)\n\nContributing\n============\n\nWant to contribute? Read the CONTRIBUTING.md.\n\nLicense\n=======\n\n.. image:: https://i.creativecommons.org/l/by/4.0/88x31.png\n    :target: http://creativecommons.org/licenses/by/4.0/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Fcapivara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphamorim%2Fcapivara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Fcapivara/lists"}