+{"name": "test_save_coupon[browser0]", "status": "broken", "statusDetails": {"message": "selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//span[.=\"Save\"]\"}\n (Session info: chrome=78.0.3904.97)", "trace": "browser = <selenium.webdriver.chrome.webdriver.WebDriver (session=\"e6fd329482fe77fc182a31ef64dc882b\")>\n\n @allure.feature(\"Save Coupons\")\n def test_save_coupon(browser):\n \ttime.sleep(5)\n> \tsave=browser.find_element_by_xpath('//span[.=\"Save\"]')\n\nonx\\test_pytest.py:196: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n..\\..\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:394: in find_element_by_xpath\n return self.find_element(by=By.XPATH, value=xpath)\n..\\..\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:978: in find_element\n 'value': value})['value']\n..\\..\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py:321: in execute\n self.error_handler.check_response(response)\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\nself = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x0982D070>\nresponse = {'status': 404, 'value': '{\"value\":{\"error\":\"no such element\",\"message\":\"no such element: Unable to locate element: {\\...x75FC343D+18]\\\\n\\\\tRtlInitializeExceptionChain [0x775B9802+99]\\\\n\\\\tRtlInitializeExceptionChain [0x775B97D5+54]\\\\n\"}}'}\n\n def check_response(self, response):\n \"\"\"\n Checks that a JSON response from the WebDriver does not have an error.\n \n :Args:\n - response - The JSON response from the WebDriver server as a dictionary\n object.\n \n :Raises: If the response contains an error message.\n \"\"\"\n status = response.get('status', None)\n if status is None or status == ErrorCode.SUCCESS:\n return\n value = None\n message = response.get(\"message\", \"\")\n screen = response.get(\"screen\", \"\")\n stacktrace = None\n if isinstance(status, int):\n value_json = response.get('value', None)\n if value_json and isinstance(value_json, basestring):\n import json\n try:\n value = json.loads(value_json)\n if len(value.keys()) == 1:\n value = value['value']\n status = value.get('error', None)\n if status is None:\n status = value[\"status\"]\n message = value[\"value\"]\n if not isinstance(message, basestring):\n value = message\n message = message.get('message')\n else:\n message = value.get('message', None)\n except ValueError:\n pass\n \n exception_class = ErrorInResponseException\n if status in ErrorCode.NO_SUCH_ELEMENT:\n exception_class = NoSuchElementException\n elif status in ErrorCode.NO_SUCH_FRAME:\n exception_class = NoSuchFrameException\n elif status in ErrorCode.NO_SUCH_WINDOW:\n exception_class = NoSuchWindowException\n elif status in ErrorCode.STALE_ELEMENT_REFERENCE:\n exception_class = StaleElementReferenceException\n elif status in ErrorCode.ELEMENT_NOT_VISIBLE:\n exception_class = ElementNotVisibleException\n elif status in ErrorCode.INVALID_ELEMENT_STATE:\n exception_class = InvalidElementStateException\n elif status in ErrorCode.INVALID_SELECTOR \\\n or status in ErrorCode.INVALID_XPATH_SELECTOR \\\n or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:\n exception_class = InvalidSelectorException\n elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:\n exception_class = ElementNotSelectableException\n elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:\n exception_class = ElementNotInteractableException\n elif status in ErrorCode.INVALID_COOKIE_DOMAIN:\n exception_class = InvalidCookieDomainException\n elif status in ErrorCode.UNABLE_TO_SET_COOKIE:\n exception_class = UnableToSetCookieException\n elif status in ErrorCode.TIMEOUT:\n exception_class = TimeoutException\n elif status in ErrorCode.SCRIPT_TIMEOUT:\n exception_class = TimeoutException\n elif status in ErrorCode.UNKNOWN_ERROR:\n exception_class = WebDriverException\n elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:\n exception_class = UnexpectedAlertPresentException\n elif status in ErrorCode.NO_ALERT_OPEN:\n exception_class = NoAlertPresentException\n elif status in ErrorCode.IME_NOT_AVAILABLE:\n exception_class = ImeNotAvailableException\n elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:\n exception_class = ImeActivationFailedException\n elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:\n exception_class = MoveTargetOutOfBoundsException\n elif status in ErrorCode.JAVASCRIPT_ERROR:\n exception_class = JavascriptException\n elif status in ErrorCode.SESSION_NOT_CREATED:\n exception_class = SessionNotCreatedException\n elif status in ErrorCode.INVALID_ARGUMENT:\n exception_class = InvalidArgumentException\n elif status in ErrorCode.NO_SUCH_COOKIE:\n exception_class = NoSuchCookieException\n elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:\n exception_class = ScreenshotException\n elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:\n exception_class = ElementClickInterceptedException\n elif status in ErrorCode.INSECURE_CERTIFICATE:\n exception_class = InsecureCertificateException\n elif status in ErrorCode.INVALID_COORDINATES:\n exception_class = InvalidCoordinatesException\n elif status in ErrorCode.INVALID_SESSION_ID:\n exception_class = InvalidSessionIdException\n elif status in ErrorCode.UNKNOWN_METHOD:\n exception_class = UnknownMethodException\n else:\n exception_class = WebDriverException\n if value == '' or value is None:\n value = response['value']\n if isinstance(value, basestring):\n if exception_class == ErrorInResponseException:\n raise exception_class(response, value)\n raise exception_class(value)\n if message == \"\" and 'message' in value:\n message = value['message']\n \n screen = None\n if 'screen' in value:\n screen = value['screen']\n \n stacktrace = None\n if 'stackTrace' in value and value['stackTrace']:\n stacktrace = []\n try:\n for frame in value['stackTrace']:\n line = self._value_or_default(frame, 'lineNumber', '')\n file = self._value_or_default(frame, 'fileName', '<anonymous>')\n if line:\n file = \"%s:%s\" % (file, line)\n meth = self._value_or_default(frame, 'methodName', '<anonymous>')\n if 'className' in frame:\n meth = \"%s.%s\" % (frame['className'], meth)\n msg = \" at %s (%s)\"\n msg = msg % (meth, file)\n stacktrace.append(msg)\n except TypeError:\n pass\n if exception_class == ErrorInResponseException:\n raise exception_class(response, message)\n elif exception_class == UnexpectedAlertPresentException:\n alert_text = None\n if 'data' in value:\n alert_text = value['data'].get('text')\n elif 'alert' in value:\n alert_text = value['alert'].get('text')\n raise exception_class(message, screen, stacktrace, alert_text)\n> raise exception_class(message, screen, stacktrace)\nE selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//span[.=\"Save\"]\"}\nE (Session info: chrome=78.0.3904.97)\n\n..\\..\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\selenium\\webdriver\\remote\\errorhandler.py:242: NoSuchElementException"}, "parameters": [{"name": "browser", "value": "<selenium.webdriver.chrome.webdriver.WebDriver (session=\"e6fd329482fe77fc182a31ef64dc882b\")>"}], "start": 1574109599826, "stop": 1574109634886, "uuid": "9c038a51-e284-4d7e-9855-15b6e8ebaa6a", "historyId": "c85ce0903b55a23ab6c24561565be26d", "testCaseId": "71ca7f7a0a46775bb02838297f1b9e7c", "fullName": "onx.test_pytest#test_save_coupon", "labels": [{"name": "feature", "value": "Save Coupons"}, {"name": "parentSuite", "value": "onx"}, {"name": "suite", "value": "test_pytest"}, {"name": "host", "value": "CDXN-IT031443"}, {"name": "thread", "value": "32320-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "onx.test_pytest"}]}
0 commit comments