{ "info": { "author": "Joaquin Duo", "author_email": "joaduo@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "Xpathwebdriver\n==============\n\nPython wrapper for interacting with Selenium through XPath and CSS\nselectors. The main difference is that you can use use XPaths like:\n\n::\n\n //div/text()\n\nWhich will return you a string, something selenium does not support\neasily. E.g. you could do:\n\n.. code:: python\n\n from xpathwebdriver.simple_xpath_browser import SimpleXpathBrowser\n\n browser = SimpleXpathBrowser()\n browser.get_url('https://duckduckgo.com/')\n browser.fill(\".//*[@id='search_form_input_homepage']\", 'xpathwebdriver\\n')\n # Using xpath that returns text\n for idx, t in enumerate(browser.select_xpath('//div/text()')):\n print(idx, t)\n # Using css selector which returns elements\n for idx, elem in enumerate(browser.select_css('.result__title')):\n print(idx, elem.text)\n\nExample\n-------\n\nUnit Test for web site.\n\n.. code:: python\n\n import unittest\n from xpathwebdriver.simple_xpath_browser import SimpleXpathBrowser\n\n class SearchEnginesDemo(unittest.TestCase):\n def setUp(self):\n # Get Xpath browser\n self.browser = SimpleXpathBrowser()\n\n def tearDown(self):\n # Make sure we quit those webdrivers created in this specific \"level of life\"\n del self.browser\n\n def test_duckduckgo(self):\n # Load a local page for the demo\n self.browser.get_url('https://duckduckgo.com/')\n # Type smoothtest and press enter\n self.browser.fill(\".//*[@id='search_form_input_homepage']\", 'xpathwebdriver\\n')\n\nInstall\n-------\n\nInstalling selenium and the browser driver\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nMake sure you installed selenium and webdriver and that they are\nworking. You can test selenium with:\n\n.. code:: python\n\n from selenium import webdriver\n import time\n driver = webdriver.Chrome()\n driver.maximize_window()\n driver.get('https://www.google.com')\n print('You can 10 secs to check the browser window')\n time.sleep(10)\n\nFind the easiest way to install selenium in your environment, for\nexample in ubuntu, you can do:\n\n::\n\n apt install python-pip python-selenium\n # Or in case of python3 use: python3-pip python3-selenium packages\n\nThen install driver for chrome and gecko from:\n\n- https://www.seleniumhq.org/download/#thirdPartyDrivers\n- http://chromedriver.chromium.org/\n- https://github.com/mozilla/geckodriver/releases\n- PhantomJs: http://phantomjs.org/download.html (has the driver\n embedded)\n\nDecompressed executables should be in yor PATH. If you update python's\n``webdriver`` package make sure you update browsers and drivers.\n\nInstalling Xpathwebdriver\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOnce selenium is working you can easily install this wrapper.\n\n::\n\n pip install xpathwebdriver\n\nRunning the interactive shell\n-----------------------------\n\nInstall ipython package (in Ubuntu probably you can install ipython or\nipython3 package)\n\n::\n\n pip install ipython\n\nYou then can run from command line\n\n::\n\n xpathshell\n\nOr opening a website:\n\n::\n\n xpathshell duckduckgo.com\n\nTo open https://duckduckgo.com\n\nYou will get an IPython interactive shell like:\n\n::\n\n XpathBrowser in 'b' or 'browser' variables\n Current url: https://duckduckgo.com/\n In [1]:\n\nYou can check ``XpathBrowser`` api at:\n\n- https://github.com/joaduo/xpathwebdriver/blob/master/xpathwebdriver\\_tests/test\\_XpathBrowser.py\n- https://github.com/joaduo/xpathwebdriver/blob/master/xpathwebdriver/xpath\\_browser.py\n\nUseful links for working with XPath\n-----------------------------------\n\n- https://addons.mozilla.org/es/firefox/addon/firebug/\n- https://addons.mozilla.org/es/firefox/addon/firepath/\n- http://ricostacruz.com/cheatsheets/xpath.html\n- http://xpath.alephzarro.com/content/cheatsheet.html", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/joaduo/xpathwebdriver", "keywords": "testing,automation,web,unittest,webdriver,selenium", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "xpathwebdriver", "package_url": "https://pypi.org/project/xpathwebdriver/", "platform": "", "project_url": "https://pypi.org/project/xpathwebdriver/", "project_urls": { "Homepage": "https://github.com/joaduo/xpathwebdriver" }, "release_url": "https://pypi.org/project/xpathwebdriver/0.2.5/", "requires_dist": null, "requires_python": "", "summary": "Simpler webdriver API through a wrapper", "version": "0.2.5" }, "last_serial": 4122999, "releases": { "0.1.4": [], "0.1.5": [ { "comment_text": "", "digests": { "md5": "72ee0aa2dabd562793b559d363b857c7", "sha256": "ab731eb62b18dae6ef32886246db74904b64ce2c171fbe50e9a9d69de71d1fe1" }, "downloads": -1, "filename": "xpathwebdriver-0.1.5.tar.gz", "has_sig": false, "md5_digest": "72ee0aa2dabd562793b559d363b857c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19464, "upload_time": "2017-01-20T01:14:03", "url": "https://files.pythonhosted.org/packages/5e/ac/919c9f3c3d14a1ac43daacc89c7d2ff35c1c65560389b13add33a330dc17/xpathwebdriver-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "7fe24ef48a2dbe05b6620dc4e35ed2ac", "sha256": "c95dd87a75d7be12730cf8b8936755b76d33d6788b70c0c1c23810f2bb901705" }, "downloads": -1, "filename": "xpathwebdriver-0.1.6.tar.gz", "has_sig": false, "md5_digest": "7fe24ef48a2dbe05b6620dc4e35ed2ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19517, "upload_time": "2017-01-21T06:12:06", "url": "https://files.pythonhosted.org/packages/c8/e8/40abe3b6afdec872cdde6c949abc1e21e43270fa9f80e4e3d6d1bbbaaab5/xpathwebdriver-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "85a0c0080c27eab60a418820bcd7a392", "sha256": "1be05a7c43f5bf9521d7873e27bea14be4fee2ebebfd51511a57d72dec67d79a" }, "downloads": -1, "filename": "xpathwebdriver-0.1.7.tar.gz", "has_sig": false, "md5_digest": "85a0c0080c27eab60a418820bcd7a392", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19176, "upload_time": "2017-01-24T22:11:44", "url": "https://files.pythonhosted.org/packages/bf/e4/ee83774ffedadd112d9fc337900cf302e19f8c091462682c1b9b0fe0bd45/xpathwebdriver-0.1.7.tar.gz" } ], "0.1.8": [ { "comment_text": "", "digests": { "md5": "51105a847114fd6a08bd6cc399e36861", "sha256": "696738a8edeee8d1ab3fabcfb7e4d4401c661b16cb33ee10f3a2410dfca4a844" }, "downloads": -1, "filename": "xpathwebdriver-0.1.8.tar.gz", "has_sig": false, "md5_digest": "51105a847114fd6a08bd6cc399e36861", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20989, "upload_time": "2017-03-09T21:36:20", "url": "https://files.pythonhosted.org/packages/bf/57/3f61e7e9dd840f6c33c6aa8612b16bd3e6fdd864c7f136751db5173d54d6/xpathwebdriver-0.1.8.tar.gz" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "11ec9a757febb95ad758dc16af39917f", "sha256": "7136266a55ef6b593dc3206cbcf46b112d6f33027dee8b5c2e4cb2f7af67d771" }, "downloads": -1, "filename": "xpathwebdriver-0.1.9.tar.gz", "has_sig": false, "md5_digest": "11ec9a757febb95ad758dc16af39917f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21134, "upload_time": "2017-04-07T05:41:49", "url": "https://files.pythonhosted.org/packages/09/1c/2d5389a40d8c2a1bdb105b724b8a719015ea3d044d7fa5b99c1a36f98b8e/xpathwebdriver-0.1.9.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6894793e3638ad8c4feb36e0f02e6423", "sha256": "eec98857e78e6c8c3ce26b4aa3860d7ce4ebdf8dbcee6c6b0faee5ceeb158fbd" }, "downloads": -1, "filename": "xpathwebdriver-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6894793e3638ad8c4feb36e0f02e6423", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21166, "upload_time": "2017-04-07T08:50:42", "url": "https://files.pythonhosted.org/packages/64/b0/9f5851437b45e7c04b9d37a631f0d194af6ca90cebcaf8b26c3a049a5796/xpathwebdriver-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "a882de3c889b1f837f1bcd05e0667374", "sha256": "22cc52f9cf6ef1b9b2df91e3ee99d278f80b514f5fdc8e3fa058589ab6c54cf7" }, "downloads": -1, "filename": "xpathwebdriver-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a882de3c889b1f837f1bcd05e0667374", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21365, "upload_time": "2017-07-21T02:18:50", "url": "https://files.pythonhosted.org/packages/a4/65/af49230d50b34f90a03f4e08abfe7a25a93a82beb93b24097f7df4c4b973/xpathwebdriver-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "243ac631f4ed0373e415fd878a07379f", "sha256": "bd5647e3a60bada1b88fbfae702c8dde7cd8338aa7eaafa9b0538b73530c279e" }, "downloads": -1, "filename": "xpathwebdriver-0.2.2.tar.gz", "has_sig": false, "md5_digest": "243ac631f4ed0373e415fd878a07379f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21506, "upload_time": "2018-07-29T04:08:44", "url": "https://files.pythonhosted.org/packages/48/c9/a89b8c512f751550ce4d804f38d81730e49fa768877d07a1fd3b373ce6c8/xpathwebdriver-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "df6eac24efdd3c753927b235fed07dfa", "sha256": "701c40bfbbdf869d7d44ee848ea47d62d3cff3c02e792dde2cb200da9e8c69d6" }, "downloads": -1, "filename": "xpathwebdriver-0.2.3.tar.gz", "has_sig": false, "md5_digest": "df6eac24efdd3c753927b235fed07dfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22505, "upload_time": "2018-07-30T21:50:16", "url": "https://files.pythonhosted.org/packages/e6/e8/9803af039896484db54099fcc315552fed6fa3a4a3ba186e637c10005856/xpathwebdriver-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "f3b5cf1c16a9bcc98fba654a2c995e61", "sha256": "ad8f53e5f84987f5c9d9a20ec4001ee233e4d5f46721d405adce4c6c5a102d43" }, "downloads": -1, "filename": "xpathwebdriver-0.2.4.tar.gz", "has_sig": false, "md5_digest": "f3b5cf1c16a9bcc98fba654a2c995e61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23084, "upload_time": "2018-07-30T23:04:06", "url": "https://files.pythonhosted.org/packages/33/ef/eef284a040d88052dc9c3d71364ddcbfe6630b8a924413ef8ba544551857/xpathwebdriver-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "4f7f192d873f324c7266b9bffa7341f4", "sha256": "5bb824aaff30f9135842a6cd8a19a5c7608d6ac1dde0d04fbee49783db44c64c" }, "downloads": -1, "filename": "xpathwebdriver-0.2.5.tar.gz", "has_sig": false, "md5_digest": "4f7f192d873f324c7266b9bffa7341f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23286, "upload_time": "2018-08-01T03:28:25", "url": "https://files.pythonhosted.org/packages/d0/45/14858d287a1aa06336c97ec5c1b345a43e18ab7245542c7f66a77eff3c0b/xpathwebdriver-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4f7f192d873f324c7266b9bffa7341f4", "sha256": "5bb824aaff30f9135842a6cd8a19a5c7608d6ac1dde0d04fbee49783db44c64c" }, "downloads": -1, "filename": "xpathwebdriver-0.2.5.tar.gz", "has_sig": false, "md5_digest": "4f7f192d873f324c7266b9bffa7341f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23286, "upload_time": "2018-08-01T03:28:25", "url": "https://files.pythonhosted.org/packages/d0/45/14858d287a1aa06336c97ec5c1b345a43e18ab7245542c7f66a77eff3c0b/xpathwebdriver-0.2.5.tar.gz" } ] }