{ "info": { "author": "Juan Martin Moschino", "author_email": "jmoschino@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "NAME\n rest_api_basic_helpers\n\nFUNCTIONS\n check_response_message(api_object, message)\n Verifies that the message is present in the api object\n :param api_object: The api object\n :param message: The message to check\n :return: Nothing, it throws an exception\n\n delete_method(context, url, check_response_code=True, check_message=None)\n Calls the method delete in the specified url\n :param context: The working context\n :param url: The url to delete\n :param check_response_code: Verifies with an assert that the response is 200 http (default:True)\n :param check_message: Checks for the specified message in the response (default: None)\n :return: It stores the response in the variable api context, it can be obtained with get_last response method\n\n erase_last_response(context)\n Erase the content of the env variable for api responses (used by API methods)\n :param context: The working context\n :return: Nothing, it sets the variable an empty string value\n\n get_last_response(context)\n Returns the last response stored in the variable (used by API methods)\n :param context: The working context\n :return: The last response\n\n get_method(context, url, check_response_code=True, check_message=None)\n Calls the get method in the specified url\n :param context: The working context\n :param url: The url to get\n :param check_response_code: Verifies with an assert that the response is 200 http (default:True)\n :param check_message: Checks for the specified message in the response (default: None)\n :return: It stores the response in the variable in the api context, it can be obtained with get_last_response method\n\n post_method(context, url, data, check_response_code=True, check_message=None)\n Calls the post method in the specified url with the specified payload\n :param context: The working context\n :param url: The url to post\n :param data: The payload\n :param check_response_code: Verifies with an assert that the response is 200 http (default:True)\n :param check_message: Checks for the specified message in the response (default: None)\n :return: It stores the response in the variable in the api context, it can be obtained with get_last_response method\n\n put_method(context, url, data, check_response_code=True, check_message=None)\n Calls the put method in the specified url with the specified payload\n :param context: The working context\n :param url: The url to put\n :param data: The payload\n :param check_response_code: Verifies with an assert that the response is 200 http (default:True)\n :param check_message: Checks for the specified message in the response (default: None)\n :return: It stores the response in the variable in the api context, it can be obtained with get_last_response method\n\n set_api_response(context, response)\n Set a value to the env variable for the last api response (used by API methods)\n :param context: The working context\n :param response: The last response\n :return: Nothing, it sets the response in the variable\n\n\nNAME\n selenium_basic_helpers\n\n\nFUNCTIONS\n find_element(context, element, identifier, timeout=5.0)\n Looks for a single web element in the page.\n :param context: the behave context variable.\n :param element: the element value to find.\n :param identifier: search by 'css_selector', 'id', 'name' or 'class_name'.\n :param timeout: optional parameter. Retries the search until n seconds (float).\n :return: selenium web element.\n\n find_elements(context, selector, timeout=10)\n Looks for a group of elements in the page.\n :param context: the behave context variable.\n :param selector: the css selector value to find.\n :param timeout: optional parameter. Retries the search until n seconds (float).\n :return: List of selenium web elements if found. If not elements found it will return an empty list.\n\n scroll_element_into_view(driver, element)\n Scrolls to an element.\n :param driver: the behave context.\n :param element: the web element object.\n :return: nothing.\n\n take_snapshot(context, output_format, text)\n Takes an snapshot. It will be stored in a html file if the format is base64 or in a separate png file. The output directory will be snapshots.\n :param context: The behave context.\n :param output:format (base64 will add it to html file, or file to create a png file)\n :param text:label for base64, part of the file name in the case of file\n\n wait_for_element_to_appear(context, selector, timeout)\n Wait the specified amount of time until the element appears.\n :param context: the behave context variable.\n :param selector: css_selector corresponding to the element.\n :param timeout: time to wait until the element appears.\n :return: Nothing, if the element does not appear in the specified time then an exception is raised.\n\n wait_for_element_to_disappear(context, selector, identifier, timeout=10.0)\n Wait n seconds until the specified element dissapears.\n :param context: the behave context variable.\n :param selector: the element value to find.\n :param identifier: search by 'css_selector', 'id', 'name' or 'class_name'.\n :param timeout: Optional. time to wait until the element dissapears.\n :return: True if the element dissapears. An exception is raised if the element does not dissapear.\n\n\nSELENIUM BASE STEPS:\n******************* WHEN STEPS *****************\nwhen('take screenshot as {output_format} and show description {text}')\n\nwhen('opening the url {url}')\n\nwhen('I refresh the page')\n\nwhen('I scroll down element {element_selector} {times} times')\n\nwhen('hover on element {element} identified by {identifier}')\n\nwhen('back to the previous page')\n\nwhen('fill input field {field_name}, identified by {identifier} with the value {value}')\n\nwhen('fill select field {field_name}, identified by {identifier} with the value {value}')\n\nwhen('click on button {button_name} identified by {identifier}')\n\nwhen('click in {section} identified by {identifier}')\n\nwhen('move to element {element}, identified by {identifier}')\n\nwhen('select option {option} in combobox {element}, identified by {identifier}')\n\nwhen('hovering {selector}')\n\nwhen('clicking {selector}')\n\nwhen('click in link with text {text}')\n\nwhen('uploading {image} to {selector}')\n\nwhen('upload the video {video} to {selector}')\n\nwhen('send key {key} to {selector}')\n\nwhen('typing {value} in {selector}')\n\nwhen('selecting {option} in {selector}')\n\nwhen('drag element {source_element} into {target_element}')\n\nwhen('drag element {source_element} to positions x {x} and y {y}')\n\n\n******************* THEN STEPS *****************\n\nthen(\"wait for element {element} identified by {identifier}\")\n\nthen(\"check that the element {element} disappears, identified by {identifier}\")\n\nthen(\"the page contains the text {expected}\")\n\nthen(\"the page title must be {expected}\")\n\nthen(\"the login error message appears saying {error_message}\")\n\nthen(\"check that the combo button {combo_button} is selected\")\n\nthen(\"check that the element {selector} is not present\")\n\nthen(\"the text {text} is present in the element {element} identified by {identifier}\")\n\nthen(\"the input field {input_field_element} contains the value {value} identified by {identifier}\")\n\nthen(\"check that the element {element} is displayed, identified by {identifier}\")\n\nthen(\"wait until the element {element} is displayed, identified by {identifier}\")\n\nthen(\"expect {selector} to contain {text}\")\n\nthen(\"expect {selector} to have the value {text}\")\n\nthen(\"expect {selector} to disappear within {timeout} seconds\")\n\nthen(\"expect {selector} to disappear\")\n\nthen(\"allow time to update the UI\")\n\nthen(\"wait up to {timeout} seconds for {selector}\")\n\nthen(\"expect {selector} to have {option} selected\")\n\nthen(\"wait for element {selector} to be clickable\")\n\nthen(\"check that the combobox element {selector} selected value is {value}\")\n\nthen(\"expect {selector}\")\n\nthen(\"wait for {selector}\")", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/behave_base_lib_v010/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "behave_base_library", "package_url": "https://pypi.org/project/behave_base_library/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/behave_base_library/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/behave_base_lib_v010/" }, "release_url": "https://pypi.org/project/behave_base_library/0.1.5/", "requires_dist": null, "requires_python": null, "summary": "Base files for any behave automation project", "version": "0.1.5" }, "last_serial": 1912119, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0af4ec01b57c589b2e4d7aa0e857ba22", "sha256": "3670f5f980e4830065da99c04f22cf151fd075d2a1c5d8e55d29631c32587b92" }, "downloads": -1, "filename": "behave_base_library-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0af4ec01b57c589b2e4d7aa0e857ba22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7027, "upload_time": "2015-05-28T10:19:26", "url": "https://files.pythonhosted.org/packages/d2/7a/f418b1b83b5e891bb358eabcff828636be94dd288f82eb840505a5276b72/behave_base_library-0.1.2.tar.gz" } ], "0.1.2": [], "0.1.3": [], "0.1.4": [], "0.1.5": [ { "comment_text": "", "digests": { "md5": "675218d3f94a1fa344e65869b8f0295a", "sha256": "dd15653ac14497b50bd1158ba572211e859a070796a6d0c1b74aece9343dc25b" }, "downloads": -1, "filename": "behave_base_library-0.1.5.tar.gz", "has_sig": false, "md5_digest": "675218d3f94a1fa344e65869b8f0295a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7060, "upload_time": "2016-01-19T19:01:47", "url": "https://files.pythonhosted.org/packages/eb/d2/263afe4587a9755515d5d5b755ed7593f8b5bab654625d6b1ff42c317b34/behave_base_library-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "675218d3f94a1fa344e65869b8f0295a", "sha256": "dd15653ac14497b50bd1158ba572211e859a070796a6d0c1b74aece9343dc25b" }, "downloads": -1, "filename": "behave_base_library-0.1.5.tar.gz", "has_sig": false, "md5_digest": "675218d3f94a1fa344e65869b8f0295a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7060, "upload_time": "2016-01-19T19:01:47", "url": "https://files.pythonhosted.org/packages/eb/d2/263afe4587a9755515d5d5b755ed7593f8b5bab654625d6b1ff42c317b34/behave_base_library-0.1.5.tar.gz" } ] }