{ "info": { "author": "Sergei Chipiga", "author_email": "chipiga86@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "==========\nAnnotation\n==========\nPOM is Page-Object-Model microframework to develop web UI tests easy, quickly and with pleasure.\n\n============\nArchitecture\n============\nPOM provides API to manipulate with web UI elements and pages in browser. Under hood it uses selenium.\nBefore to act with UI element POM waits for its visibility, because in user cases user can't interact with UI element if it isn't visible at display.\nPOM provides tree hirarchy to request UI elements with UI caching mechanism at each level.\n\nPOM doesn't use **implicit_wait** method to wait UI element, because implicit_wait waits until element is present at DOM even if it isn't visible. And also implicit_wait has conflict with caching mechanism, that leads to long requests in some cases.\n\nSo POM has own implementation to wait element before interact. It leads to additinal webdriver request before interact with UI element, but provide reliable and simple architecture, without speed degradation.\n\n============\nHow to start\n============\nLet imagine simple testcase:\n\n- ``Go to https://facebook.com``\n- ``Fill login / password fields with 'admin' / 'admin' values``\n- ``Click button login``\n- ``Assert page to log in is opened``\n- ``Assert alert message is opened``\n\nIts implementation with POM:\n\n.. code:: python\n\n import unittest\n\n import pom\n from pom import ui\n from selenium.webdriver.common.by import By\n\n\n @ui.register_ui(field_login=ui.TextField(By.NAME, 'email'),\n field_password=ui.TextField(By.NAME, 'pass'))\n class FormLogin(ui.Form):\n \"\"\"Form to login.\"\"\"\n\n\n @ui.register_ui(form_login=FormLogin(By.ID, 'login_form'))\n class PageMain(pom.Page):\n \"\"\"Main page.\"\"\"\n url = '/'\n\n\n @ui.register_ui(\n alert_message=ui.Block(By.CSS_SELECTOR, 'div.uiContextualLayerPositioner'))\n class PageLogin(pom.Page):\n \"\"\"Login page.\"\"\"\n url = '/login'\n\n\n @pom.register_pages([PageMain, PageLogin])\n class Facebook(pom.App):\n \"\"\"Facebook web application.\"\"\"\n def __init__(self):\n super(Facebook, self).__init__('https://www.facebook.com', 'firefox')\n self.webdriver.maximize_window()\n self.webdriver.set_page_load_timeout(30)\n\n\n class TestCase(unittest.TestCase):\n\n def setUp(self):\n self.fb = Facebook()\n self.addCleanup(self.fb.quit)\n\n def test_facebook_invalid_login(self):\n \"\"\"User with invalid credentials can't login to facebook.\"\"\"\n self.fb.page_main.open()\n with self.fb.page_main.form_login as form:\n form.field_login.value = 'admin'\n form.field_password.value = 'admin'\n form.submit()\n assert self.fb.current_page == self.fb.page_login\n assert self.fb.page_login.alert_message.is_present\n\n**To launch example:**\n\n- Save example code in file ``test_pom.py``\n- Install POM framework ``pip install python-pom``\n- Launch test example ``python -m unittest test_pom``\n\nFull example of usage is in https://github.com/sergeychipiga/horizon_autotests.\n\n=======================\nSupported UI components\n=======================\nIn progress...", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sergeychipiga/pom", "keywords": "", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "python-pom", "package_url": "https://pypi.org/project/python-pom/", "platform": "", "project_url": "https://pypi.org/project/python-pom/", "project_urls": { "Homepage": "https://github.com/sergeychipiga/pom" }, "release_url": "https://pypi.org/project/python-pom/1.0.5/", "requires_dist": null, "requires_python": "", "summary": "POM is Page-Object-Model microframework to develop web UI tests easy, quickly and with pleasure.", "version": "1.0.5" }, "last_serial": 3423622, "releases": { "1.0.2": [ { "comment_text": "", "digests": { "md5": "4d8b58abb8f74c15bd7bf699110cef7c", "sha256": "4ea7929ea0d01f329ebb0b29d0d008dd3b8c64b70e855cfe54059869aec3688a" }, "downloads": -1, "filename": "python_pom-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "4d8b58abb8f74c15bd7bf699110cef7c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16215, "upload_time": "2016-08-26T08:42:38", "url": "https://files.pythonhosted.org/packages/ea/54/e7ffd48e3e38e39e17e1a3bca5747ed90ce477160bdf20820d4304c9d816/python_pom-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "71777af322413126e85cb43d23218132", "sha256": "07155df43e706887e9133a323519a8f81f6585ce61fa20095cf3f3d573ccfed7" }, "downloads": -1, "filename": "python-pom-1.0.2.tar.gz", "has_sig": false, "md5_digest": "71777af322413126e85cb43d23218132", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8586, "upload_time": "2016-08-26T08:42:45", "url": "https://files.pythonhosted.org/packages/50/93/e982920031bb11b852cf116161ae7cf840df1af312c36d9c9e09181f2110/python-pom-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "c89e902cc24186f48b2c163ebea52cf2", "sha256": "c9dcd4eda857c0e735dd44ae94a3cf541460cfb53b03639bb11beb32584faf9c" }, "downloads": -1, "filename": "python_pom-1.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "c89e902cc24186f48b2c163ebea52cf2", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16211, "upload_time": "2017-03-10T10:48:54", "url": "https://files.pythonhosted.org/packages/b3/ee/38301e81044970ff2a6249e1071b1e8400dd3bbbb20e25dec59aa745b6f5/python_pom-1.0.3-py2-none-any.whl" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "e3bb83f83ac40b58c6ba0f81a99d39ae", "sha256": "02c361c4de2a260d42bb97fc14aac5295d79838d1fd7779c39131be26a748ab2" }, "downloads": -1, "filename": "python_pom-1.0.4-py2-none-any.whl", "has_sig": false, "md5_digest": "e3bb83f83ac40b58c6ba0f81a99d39ae", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 16570, "upload_time": "2017-03-11T06:55:31", "url": "https://files.pythonhosted.org/packages/26/39/5324aefb88e43e2bdf248485c3c7a7fcecf7649e3c0e50683f434d33b39e/python_pom-1.0.4-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f12f8e73eb6c88af76e436999773529a", "sha256": "5ab80aff09f2b0aad22a7990f1d143dbe3ac6e149c99ef06dbc701b57c584c6d" }, "downloads": -1, "filename": "python_pom-1.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "f12f8e73eb6c88af76e436999773529a", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 16368, "upload_time": "2017-12-11T17:54:58", "url": "https://files.pythonhosted.org/packages/45/2a/dc4b96e1dbea752a0b8b4d427886dc2c3e721eb11b9ac2f5806b97de26fe/python_pom-1.0.4-py3-none-any.whl" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "af5d5f6252f4637e58d6965d4afec043", "sha256": "9f06173f898cc285a05e687ff6fec656cc683dd0fdfa557c80548809dcf272a4" }, "downloads": -1, "filename": "python_pom-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "af5d5f6252f4637e58d6965d4afec043", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 16401, "upload_time": "2017-12-17T20:07:22", "url": "https://files.pythonhosted.org/packages/d8/2d/04224b683c268a43658d45396aa917c772e4fb8ea7ff2b6bd28413d0e9e6/python_pom-1.0.5-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "af5d5f6252f4637e58d6965d4afec043", "sha256": "9f06173f898cc285a05e687ff6fec656cc683dd0fdfa557c80548809dcf272a4" }, "downloads": -1, "filename": "python_pom-1.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "af5d5f6252f4637e58d6965d4afec043", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 16401, "upload_time": "2017-12-17T20:07:22", "url": "https://files.pythonhosted.org/packages/d8/2d/04224b683c268a43658d45396aa917c772e4fb8ea7ff2b6bd28413d0e9e6/python_pom-1.0.5-py3-none-any.whl" } ] }