{ "info": { "author": "Meta IT", "author_email": "technique@meta-it.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Programming Language :: Python :: 2.7" ], "description": "############\nodooselenium\n############\n\n`odooselenium` provides tools to interact with `Odoo`_ using `Selenium`_:\n\n* base test class;\n* helpers to go to module or view, click button, fill in forms...\n\nThis project's initial scope is Odoo's core features. Third-party addons can be\nsupported by additional projects.\n\n\n*******\nExample\n*******\n\nLet's write a script that creates then deletes a customer...\n\n.. code:: python\n\n from selenium.webdriver import Firefox\n from selenium.webdriver.common.by import By\n\n import odooselenium\n\n\n webdriver = Firefox()\n ui = odooselenium.OdooUI(\n webdriver,\n base_url=u'http://localhost:8069',\n )\n\n # Log in.\n ui.login('myusername', 'mypassword', 'mydatabase')\n\n #\u00a0Navigate to \"Accounting / Customers\".\n ui.go_to_module('Accounting')\n ui.go_to_view('Customers')\n\n # Toggle list view.\n assert ui.get_url_fragments()['view_type'] == u'kanban'\n list_view_button = webdriver.find_element(\n By.CSS_SELECTOR,\n \".oe_vm_switch_list\")\n with ui.wait_for_ajax_load():\n list_view_button.click()\n assert ui.get_url_fragments()['view_type'] == u'list'\n # Click \"Create\" button.\n create_button = webdriver.find_element(\n By.XPATH,\n \"//button[\"\n \"@data-bt-testing-model_name='res.partner' and \"\n \"@data-bt-testing-name='oe_list_add']\")\n with ui.wait_for_ajax_load():\n create_button.click()\n\n # Fill then submit the form.\n name_field = webdriver.find_element(\n By.XPATH,\n \"//input[\"\n \"@data-bt-testing-model_name='res.partner' and \"\n \"@data-bt-testing-name='name']\")\n name_field.send_keys('Sample customer')\n save_button = webdriver.find_element(\n By.XPATH,\n \"//button[\"\n \"@data-bt-testing-model_name='res.partner' and \"\n \"@data-bt-testing-name='oe_form_button_save']\"\n )\n with ui.wait_for_ajax_load():\n save_button.click()\n\n\nAnd here is a simple test class:\n\n.. code:: python\n\n import odooselenium\n\n\n class SampleTestCase(odooselenium.TestCase):\n def configure(self, **kwargs):\n \"\"\"Override this method to alter settings... if necessary.\"\"\"\n kwargs.setdefault('url', 'http://localhost:8069')\n kwargs.setdefault('username', 'admin')\n kwargs.setdefault('password', 'admin')\n kwargs.setdefault('dbname', 'test')\n super(SampleTestCase, self).configure(kwargs)\n\n def test_ui(self):\n # self.ui is instance of odooselenium.OdooUI.\n self.ui.go_to_module('Accounting')\n # self.webdriver is Selenium's webdriver.\n self.webdriver.find_element_by_css_selector('body')\n\nSee also `odooselenium`'s own tests at\nhttps://github.com/meta-it/odooselenium/tree/master/tests\n\n\n************\nInstallation\n************\n\nSee `INSTALL `_.\n\n\n**********\nRessources\n**********\n\n* Documentation: only this README for now.\n* PyPI: https://pypi.python.org/pypi/odooselenium\n* Code repository: https://github.com/meta-it/odooselenium\n* Bugtracker: https://github.com/meta-it/odooselenium/issues\n* Continuous integration: https://travis-ci.org/meta-it/odooselenium\n\n\n.. _`Odoo`: https://odoo.com\n.. _`Selenium`: https://pypi.python.org/pypi/selenium/", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.python.org/pypi/odooselenium", "keywords": "odoo selenium==2.53.0", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "odooselenium", "package_url": "https://pypi.org/project/odooselenium/", "platform": "", "project_url": "https://pypi.org/project/odooselenium/", "project_urls": { "Homepage": "https://pypi.python.org/pypi/odooselenium" }, "release_url": "https://pypi.org/project/odooselenium/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "Tools to interact with Odoo using Selenium", "version": "1.0.3" }, "last_serial": 2549410, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "d7b146254ab0097384a4c0f86e6caf78", "sha256": "41e24842a298fd0b6e32e3ec300eaac019636a3396dbd23595825b08162e4464" }, "downloads": -1, "filename": "odooselenium-0.1.tar.gz", "has_sig": false, "md5_digest": "d7b146254ab0097384a4c0f86e6caf78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25531, "upload_time": "2015-11-23T15:52:21", "url": "https://files.pythonhosted.org/packages/91/f4/c862449487e443657122cdb3ebd29ad5068d44a89eeff0eb9a90643745b4/odooselenium-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ee2378fb50d758b023653711a693af76", "sha256": "b272db5070b6aa90a807c83c432d00f3ca778bc089be00dfe626dfb71203958a" }, "downloads": -1, "filename": "odooselenium-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ee2378fb50d758b023653711a693af76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26680, "upload_time": "2015-11-25T09:14:14", "url": "https://files.pythonhosted.org/packages/6b/e3/66b552e7eecfb22d9814a08f4f93fe0967b9b83af467893def25c0c88fc2/odooselenium-0.1.1.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "eee9cab783e70c38c575a36e2a6f107d", "sha256": "4b425e5c5a5edd6c9e435f4c2d1eff994aa0179e924707635c9679f2ed89c5e0" }, "downloads": -1, "filename": "odooselenium-1.0.3.zip", "has_sig": false, "md5_digest": "eee9cab783e70c38c575a36e2a6f107d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63994, "upload_time": "2017-01-02T08:58:32", "url": "https://files.pythonhosted.org/packages/c8/54/c209291121fe281b03082ffd4c94bb84047d26affeabd5c5be2bf2ccd75b/odooselenium-1.0.3.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eee9cab783e70c38c575a36e2a6f107d", "sha256": "4b425e5c5a5edd6c9e435f4c2d1eff994aa0179e924707635c9679f2ed89c5e0" }, "downloads": -1, "filename": "odooselenium-1.0.3.zip", "has_sig": false, "md5_digest": "eee9cab783e70c38c575a36e2a6f107d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 63994, "upload_time": "2017-01-02T08:58:32", "url": "https://files.pythonhosted.org/packages/c8/54/c209291121fe281b03082ffd4c94bb84047d26affeabd5c5be2bf2ccd75b/odooselenium-1.0.3.zip" } ] }