Report generated on 25-May-2022 at 18:20:57 by pytest-html v2.1.1
Packages | {"pluggy": "0.13.1", "py": "1.9.0", "pytest": "6.1.0"} |
Platform | Windows-10-10.0.19041-SP0 |
Plugins | {"allure-pytest": "2.8.18", "datadir": "1.3.1", "html": "2.1.1", "metadata": "1.10.0"} |
Python | 3.8.5 |
237 tests ran in 8410.10 seconds.
(Un)check the boxes to filter the results.
18 passed, 0 skipped, 219 failed, 0 errors, 0 expected failures, 0 unexpected passesShow all details / Hide all details
Result | Test | Duration | Links |
---|---|---|---|
No results found. Try to check the filters | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_NewUserRegisteration_StandAloneRegisteration_B2C | 2.45 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231626247F0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'db_type': 'mysql', 'lms_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16834","high","LMS Regression","Pradeep") def test_NewUserRegisteration_StandAloneRegisteration_B2C(self,initialize_pages,testdata): ''' Objective : This is to verify that the LEarner should be registered successfully. Step 01: Navigate to login page Step 02: Click on Sign up CTA Step 03: Click on Sign up with Email Step 04: Fill up the required details Step 05: click on create account Step 06: Click on logout ''' #Step 01: Navigate to login page #Step 02: Click on Sign up CTA #Step 03: Click on Sign up with Email #Step 04: Fill up the required details #Step 05: click on create account #Step 06: Click on logout pytest.driver.delete_all_cookies() > email_id = TestLMSRegression.create_newUser(self,testdata) test\test_LMS_Regression_Test.py:149: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:56: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log setup------------------------------- [32mINFO [0m setup:conftest.py:132 reading config from path "config.json" [32mINFO [0m setup:conftest.py:107 creating driver for provided browser - chrome | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_ProgramAssignmentVerififcation | 2.18 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231625335B0>, initialize_pages = None testdata = {'bundle_id_mp': '163', 'bundle_id_pgp': '156', 'email': 'admin@simplilearn.com', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T16835","high","LMS Regression","Pradeep") def test_ProgramAssignmentVerififcation(self,initialize_pages,testdata): ''' Objective : This test is to verify that the program assignment is successfully done . Step 01: Login to simplex application Step 02: click on listing-> bundles Step 03: Search the bundle id Step 04: verify the courses in the learning path Step 05: capture the mandatory courses ''' #Step 01: Login to simplex application > simplex_login_helper.simplex_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:176: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:8: in simplex_login pytest.driver.get(pytest.config['url'] + pytest.config['simplex_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMSAdmin_PGPAssignment_WithoutCohort | 2.22 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231623AC9A0>, initialize_pages = None testdata = {'admin_url': '/admin', 'course_id': '156', 'email': 'admin@simplilearn.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16836","high","LMS Regression","Pradeep") def test_LMSAdmin_PGPAssignment_WithoutCohort(self,initialize_pages,testdata): ''' Objective : This is to verify that PGP should be assigned to the learner successfully. Step 01: Execute the test case Step 02: Loginto the lms as admin Step 03: Click on Support-> Assignment Step 04: Assign PG Program Step 05: Fill other details Step 06: Click on submit Step 07: verify the simplex learning path for the bundle Step 08: Login as learner-> verify the program card Step 09: verify the courses under courses tab ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email=data['testdata_for_lms_regression']['learner_email'] pgp_prerequisit=data['testdata_for_lms_regression']['course_name']['pgp']['prerequisit'] pgp_mandatory=data['testdata_for_lms_regression']['course_name']['pgp']['mandatory'] pgp_elective=data['testdata_for_lms_regression']['course_name']['pgp']['elective'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() #Step 02: Loginto the lms as admin > lms_login_helper.new_b2c_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:243: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:239 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_CohortCreation | 196.47 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162542D90>, initialize_pages = None testdata = {'cohort_home_url': '/dashboard', 'cohort_mp': 'mp', 'cohort_university': 'pgp', 'course_mp': 'Full Stack Java Developer - 163', ...} @pytest.mark.test_details("SLUB-T16837","high","LMS Regression","Pradeep") def test_CohortCreation(self,initialize_pages,testdata): ''' Objective : This is to create the cohort for the program. Step 01: Go to engageX application and create the cohort Step 02: Create live classes for the cohort ''' pytest.driver.delete_all_cookies() #Step 01: Go to engageX application and create the cohort #cohort creation with Mster Program lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['cohort_home_url']) > self.pg_cohort.click_new_cohort() test\test_LMS_Regression_Test.py:315: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\cohorts_page.py:26: in click_new_cohort self.mod_cohorts.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.cohorts_page.CohortsPage object at 0x0000023162E13F40>, loc = 'mod_cohorts' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_cohorts core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//ul[@id='side-menu']//a)[8]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_cohorts on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMSAdmin_MPAssignment_classicMasters | 2.28 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162E13D90>, initialize_pages = None testdata = {'admin_url': '/admin', 'bundle_id': '67', 'bundle_name': 'Data Scientist', 'course_id': '- 67', ...} @pytest.mark.test_details("SLUB-T16838","high","LMS Regression","Pradeep") def test_LMSAdmin_MPAssignment_classicMasters(self,initialize_pages,testdata): ''' Objective : This is to verify that PGP should be assigned to the learner successfully. Step 01: Execute the test case Step 02: Loginto the lms as admin Step 03: Click on Support-> Assignment Step 04: Assign MP Program Step 05: Fill other details & submit Step 06: verify the simplex learning path for the bundle Step 07: Login as learner-> verify the program card Step 08: verify the courses under courses tab ''' pytest.driver.delete_all_cookies() > email_id = TestLMSRegression.create_newUser(self,testdata) test\test_LMS_Regression_Test.py:374: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:56: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMSAdmin_MPAssignment_CohortMaster | 2.18 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163080730>, initialize_pages = None testdata = {'admin_url': '/admin', 'bundle_id': '163', 'bundle_name': 'Data Scientist', 'course_id': '163', ...} @pytest.mark.test_details("SLUB-T16839","high","LMS Regression","Pradeep") def test_LMSAdmin_MPAssignment_CohortMaster(self,initialize_pages,testdata): ''' Objective : This is to verify that PGP should be assigned to the learner successfully. Step 01: Execute the test case Step 02: Loginto the lms as admin Step 03: Click on Support-> Assignment Step 04: Assign MP Program Step 05: Fill other details Step 06: Click on submit Step 07: verify the simplex learning path for the bundle Step 08: Login as learner-> verify the program card Step 09: verify the courses under courses tab ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) mp_prerequisit=data['testdata_for_lms_regression']['course_name']['mp']['prerequisit'] mp_mandatory=data['testdata_for_lms_regression']['course_name']['mp']['mandatory'] mp_elective=data['testdata_for_lms_regression']['course_name']['mp']['elective'] cohort_mp=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() #Step 01: Execute the test case > email_id = TestLMSRegression.create_newUser(self,testdata) test\test_LMS_Regression_Test.py:493: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:56: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:489 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMSAdmin_PGPAssignment_Cohortprogram | 2.19 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316301C9A0>, initialize_pages = None testdata = {'admin_url': '/admin', 'bundle_id': '156', 'bundle_name': 'Data Scientist', 'course_id': '156', ...} @pytest.mark.test_details("SLUB-T16840","high","LMS Regression","Pradeep") def test_LMSAdmin_PGPAssignment_Cohortprogram(self,initialize_pages,testdata): ''' Objective : This is to verify that PGP should be assigned to the learner successfully. Step 01: Execute the test case Step 02: Loginto the lms as admin Step 03: Click on Support-> Assignment Step 04: Assign PGP Program Step 05: Fill other details Step 06: Click on submit Step 07: verify the simplex learning path for the bundle Step 08: Login as learner-> verify the program card Step 09: verify the courses under courses tab ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) pgp_prerequisit=data['testdata_for_lms_regression']['course_name']['pgp']['prerequisit'] pgp_mandatory=data['testdata_for_lms_regression']['course_name']['pgp']['mandatory'] pgp_elective=data['testdata_for_lms_regression']['course_name']['pgp']['elective'] unicersity_cohort=data['testdata_for_lms_regression']['University_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() #Step 01: Execute the test case > email_id = TestLMSRegression.create_newUser(self,testdata) test\test_LMS_Regression_Test.py:592: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:56: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:588 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMS_VerifyPGProgram | 2.20 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316309CD00>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'db_type': 'mysql', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16841","high","LMS Regression","Pradeep") def test_LMS_VerifyPGProgram(self,initialize_pages,testdata): ''' Objective : This is to verify that the PGP is displayed correct. Step 01: Execute the test case Step 02: verify with DB Step 03: verify that the program is shown under PG program tab Step 04: Verify the cohort name in program card and compare with step 2 result Step 05: Capture the course count on programcount Step 06: Click on start program/go to program cta Step 07: Verify the courses under courses tab Step 08: verify the course count shown on program details page ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_pgp_cohort'] unicersity_cohort=data['testdata_for_lms_regression']['University_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:687: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:684 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMS_VerifyMPProgram_CohortMaster | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162B08790>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'db_type': 'mysql', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16842","high","LMS Regression","Pradeep") def test_LMS_VerifyMPProgram_CohortMaster(self,initialize_pages,testdata): ''' Objective : This is to verify that the MP with cohort is displayed correct. Step 01: Execute the test case Step 02: verify that the program is shown under MP program tab Step 03: Verify the cohort name in program card and compare with step 2 result Step 04: Capture the course count on programcount Step 05: Click on start program/go to program cta Step 06: Verify the courses under courses tab Step 07: verify the course count shown on program details page ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_cohort_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:768: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:765 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMS_VerifyMPProgram_ClassicMaster | 2.18 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162D52340>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'db_type': 'mysql', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16843","high","LMS Regression","Pradeep") def test_LMS_VerifyMPProgram_ClassicMaster(self,initialize_pages,testdata): ''' Objective : This is to verify that the MP with cohort is displayed correct. Step 01: Execute the test case Step 02: verify that the program is shown under MP program tab Step 03: Capture the course count on programcount Step 04: Click on start program/go to program cta Step 05: Verify the courses under courses tab Step 06: verify the course count shown on program details page ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:848: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:845 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMS_VerifyCourseProgress_OSLProgress | 2.19 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231630EF850>, initialize_pages = None testdata = {'Core_java_syllabus_url': '/courses/3004/Core-Java/syllabus', 'bigdata_hadoop_syllabus_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer/syllabus', 'course_url': '/courses', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16844","high","LMS Regression","Pradeep") def test_LMS_VerifyCourseProgress_OSLProgress(self,initialize_pages,testdata): ''' Objective : This test it to verify the osl progress is working fine. Step 01: Execute the test case Step 02: Navigate to the course Step 03: capture the osl progress on the course card Step 04: click on course card Step 05: capture the oslprogress on top of the page Step 06: play the videos Step 07: once the video is finished, verify the progress bar on the video Step 08: finish all the videos and verify the osl progress on top of the card Step 09: Click on back button Step 10: capture the osl progress on the course card Step 11: verify the same in DB ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:926: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:923 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMSVerify_CorestackLab | 2.20 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162D58B20>, initialize_pages = None testdata = {'bigdata_hadoop_syllabus_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer/syllabus', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16845","high","LMS Regression","Pradeep") def test_LMSVerify_CorestackLab(self,initialize_pages,testdata): ''' Objective : This test is to very that the corestack lab is launched successfully. Step 01: Execute the test case Step 02: Navigate to the course Step 03: Verify the label for lab on course card Step 04: click on course card Step 05: go to Labs tab Step 06: LAunch the corestack lab Step 07: End the lab Step 08: Logut from the user ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:1030: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1027 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMSVerify_VocareumLab | 2.19 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163193970>, initialize_pages = None testdata = {'bigdata_hadoop_syllabus_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer/syllabus', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16846","high","LMS Regression","Pradeep") def test_LMSVerify_VocareumLab(self,initialize_pages,testdata): ''' Objective : This test is to very that the vocareum lab is launched successfully. Step 01: Execute the test case Step 02: Navigate to the course Step 03: Verify the label for lab on course card Step 04: click on course card Step 05: go to Labs tab Step 06: LAunch the vocareum lab Step 07: End the lab Step 08: Logut from the user ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:1100: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1097 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMS_VerifyAsessment_AssessmentSubmission_Fail | 2.20 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231633245E0>, initialize_pages = None testdata = {'bigdata_hadoop_syllabus_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer/syllabus', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'machinelearning_syllabus_url': '/courses/2789/Machine-Learning-V2/syllabus', ...} @pytest.mark.test_details("SLUB-16854","high","LMS Regression","Pradeep") def test_LMS_VerifyAsessment_AssessmentSubmission_Fail(self,initialize_pages,testdata): ''' Objective : This test is to verify that assessment is submitted successfuly. Step 01: Execute the test case Step 02: Navigate to the course Step 03: click on course card Step 04: Click on Assessment tab Step 05: Click on start Assessment Step 06: verify the Right hand side options Step 07: click on any option on the answer Step 08: click on submit Step 09: click on finish assessment Step 10: verify the status and attempt ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:1174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1171 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMS_VerifyAsessment_AssessmentSubmission_Pass | 2.21 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231637B19A0>, initialize_pages = None testdata = {'bigdata_hadoop_syllabus_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer/syllabus', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'machinelearning_syllabus_url': '/courses/2789/Machine-Learning-V2/syllabus', ...} @pytest.mark.test_details("SLUB-T16855","high","LMS Regression","Pradeep") def test_LMS_VerifyAsessment_AssessmentSubmission_Pass(self,initialize_pages,testdata): ''' Objective : This test is to verify that assessment is submitted successfuly. Step 01: Execute the test case Step 02: Navigate to the course Step 03: click on course card Step 04: Click on Assessment tab Step 05: Click on start Assessment Step 06: verify the Right hand side options Step 07: click on any option on the answer Step 08: Repeat Step 7 for 5 times Step 09: click on submit Step 10: click on finish assessment Step 11: verify the status and attempt ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:1260: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1257 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_LMS_VerifyOSLCourseUnlock | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163426160>, initialize_pages = None testdata = {'big_data_hadoop_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer/syllabus', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'multi_acc_url': 'multi-account', ...} @pytest.mark.test_details("SLUB-T16856,T16857,T16858","high","LMS Regression","Pradeep") def test_LMS_VerifyOSLCourseUnlock(self,initialize_pages,testdata): ''' Objective : This test is to very that the certificate is unlocked after completing OSL. Step 01: Execute the test case (TC#5) Step 02: Execute the test case (TC#11) Step 03: Play all the videos Step 04: Verify the course progress and progress bar Step 05: click on certificate tab Step 06: Verify the nps screen Step 07: fill and submit Step 08: Verify the certificate Step 09: enter name and download Step 10: verify the social login options ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] mp_cohort=data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:1825: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1822 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BAssignment_ForExistingB2CLearners | 5.20 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231639AF0D0>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_certificationprogram': 'Certification Programs', 'b2b_url': '/apachedev/git/paperclip/public/affiliate', 'confirm_password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T16859","high","LMS Regression","Pradeep") def test_Verify_B2BAssignment_ForExistingB2CLearners(self,initialize_pages,testdata): ''' Objective : This test is to verify the assignment from B2B portal for the existing b2c learner. Step 01: LMSAdmin_MPAssignment_ClassicMaster Step 02: B2B Assignment for existing learner ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() #Step 02: B2B Assignment for existing learner > lms_login_helper.xenia_new_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:1894: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:286: in xenia_new_login pytest.driver.get(pytest.config['xenia_url_new']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1889 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_MultiAccountLoginPage | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231638A1190>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'multi_acc_url': 'multi-account', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16860","high","LMS Regression","Pradeep") def test_Verify_MultiAccountLoginPage(self,initialize_pages,testdata): ''' Objective : This test is to verify the assignment from B2B portal for the existing b2c learner. Step 01: LMSAdmin_MPAssignment_ClassicMaster Step 02: B2B Assignment for existing learner ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") logging.info(email_id) pytest.driver.delete_all_cookies() > lms_login_helper.loging_multi_acc(email_id,testdata['password']) test\test_LMS_Regression_Test.py:1952: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:232: in loging_multi_acc pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1948 test data Loaded [32mINFO [0m setup:test_LMS_Regression_Test.py:1949 irisregression1616@yopmail.com | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_LMS_Dashboard_LearnerWithCertificationTab_VerfiyLabels | 2.18 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316396A130>, initialize_pages = None testdata = {'admin_url': '/admin', 'assignment_url': '/assign', 'course_id': '-15', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16668","high","LMS Regression","Pradeep") def test_WCAG_B2C_LMS_Dashboard_LearnerWithCertificationTab_VerfiyLabels(self,initialize_pages,testdata): ''' Objective : To check labels on LMS Dashboard for all the elements under the Certification tab for the course assigned. Step 01: Login to LMS for any user. Step 02: Navigate to Certification tab and hover over each element under the tab. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_cohort_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:1991: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:1987 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_LMS_Dashboard_LearnerWithMasters_ProgramTab_VerfiyLabels | 2.31 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231638A1D30>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T16669","high","LMS Regression","Pradeep") def test_WCAG_B2C_LMS_Dashboard_LearnerWithMasters_ProgramTab_VerfiyLabels(self,initialize_pages,testdata): ''' Objective : WCAG_B2C_LMS_Dashboard_LearnerWithMaster'sProgramTab_VerfiyLabels. Step 01: Login to LMS for any user. Step 02: Navigate to Master's Program's tab and hover over each element under the tab. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2063: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2060 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_LMS_Dashboard_LearnerWithSkillUpTab_VerfiyLabels | 2.18 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316259AE20>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'automationwcag3@yopmail.com', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16670","high","LMS Regression","Pradeep") def test_WCAG_B2C_LMS_Dashboard_LearnerWithSkillUpTab_VerfiyLabels(self,initialize_pages,testdata): ''' Objective : To check labels on LMS Dashboard for all the elements under the SkillUp tab for the course assigned.. Step 01: Login to LMS for any user. Step 02: Navigate to SkillUp tab and hover over each element under the tab. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:2108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2104 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_ProgramDetailsPage_LearnerWithProgramDetailsCoursesTab_VerfiyLabels | 2.21 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316258EBB0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T16671","high","LMS Regression","Pradeep") def test_WCAG_B2C_ProgramDetailsPage_LearnerWithProgramDetailsCoursesTab_VerfiyLabels(self,initialize_pages,testdata): ''' Objective : WCAG_B2C_ProgramDetailsPage_LearnerWithProgramDetailsCoursesTab_VerfiyLabels. Step 01: Login to LMS for any user. Step 02: Click on the Master Program Card. Step 03: Hover over the elements under the Courses tab of Program Details page. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2149 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_LMS_Dashboard_LearnerWithMasters_ProgramTab_VerfiyTabNavigation | 2.19 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316384B970>, initialize_pages = None testdata = {'attribute': 'title', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16673","high","LMS Regression","Pradeep") def test_WCAG_B2C_LMS_Dashboard_LearnerWithMasters_ProgramTab_VerfiyTabNavigation(self,initialize_pages,testdata): ''' Objective : WCAG_B2C_LMS_Dashboard_LearnerWithMaster'sProgramTab_VerfiyTabNavigation. Step 01: Login to LMS for any user. Step 02: Navigate to Master's Program's tab and press the tab button continuously. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2215: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2212 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_LMS_Dashboard_LearnerWithCertificationTab_VerfiyTabNavigation | 2.19 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316345F7C0>, initialize_pages = None testdata = {'attribute': 'title', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16672","high","LMS Regression","Pradeep") def test_WCAG_B2C_LMS_Dashboard_LearnerWithCertificationTab_VerfiyTabNavigation(self,initialize_pages,testdata): ''' Objective : WCAG_B2C_LMS_Dashboard_LearnerWithCertificationProgramTab_VerfiyTabNavigation. Step 01: Login to LMS for any user. Step 02: Navigate to Certifiaction Program's tab and press the tab button continuously. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_cohort_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2259: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2256 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_LMS_Dashboard_LearnerWithSkillUpTab_VerifyTabNavigation | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163584F10>, initialize_pages = None testdata = {'attribute': 'title', 'dashboard_url': '/dashboard', 'email': 'automationwcag3@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16674","high","LMS Regression","Pradeep") def test_WCAG_B2C_LMS_Dashboard_LearnerWithSkillUpTab_VerifyTabNavigation(self,initialize_pages,testdata): ''' Objective : To check labels on LMS Dashboard for all the elements under the SkillUp tab for the course assigned.. Step 01: Login to LMS for any user. Step 02: Navigate to SkillUp tab and Press the tab button continuously on the SkillUp page. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:2304: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2300 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_WCAG_B2C_ProgramDetailsPage_LearnerWithProgramDetailsCoursesTab_VerfiyTabNavigation | 2.20 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316358EEE0>, initialize_pages = None testdata = {'attribute': 'title', 'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16675","high","LMS Regression","Pradeep") def test_WCAG_B2C_ProgramDetailsPage_LearnerWithProgramDetailsCoursesTab_VerfiyTabNavigation(self,initialize_pages,testdata): ''' Objective : WCAG_B2C_ProgramDetailsPage_LearnerWithProgramDetailsCoursesTab_VerfiyTabNavigation Step 01: Login to LMS for any user. Step 02: Click on the Master Program Card. Step 03: Press the tab button continuously on the Courses tab of Program Details page. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2347: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2344 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_ProgramExpiry_ClassicMasterProgram | 2.21 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163FA08E0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T16678","high","LMS Regression","Pradeep") def test_ProgramExpiry_ClassicMasterProgram(self,initialize_pages,testdata): ''' Objective : To check that the classic master program expired post the access days are exceeded.. step 01: Assign a Classic Master program to a B2C user and validate the access days count on the Master Program card. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_classic_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2395: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2392 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_FreeExtension_Course_WithinOneDay | 2.18 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231629A3AC0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'home_url': '/dashboard', 'onboarding_url': '/oob/onboarding', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T16679","high","LMS Regression","Pradeep") def test_FreeExtension_Course_WithinOneDay(self,initialize_pages,testdata): ''' Objective : To check that the classic master program expired post the access days are exceeded.. Step 01: Assign a course with 1 day of access. Step 02: Login to LMS. Step 03: Click on ""Get Free Extension"" CTA." Step 04: Cick on "EXTEND THIS COURSE" CTA on the popup. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_cohort_master'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2441: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2437 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_SelfServeCohort | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163CCCBE0>, initialize_pages = None testdata = {'cohort_change_success_message': 'Cohort Changed Successfully', 'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': '/dashboard', 'db_type': 'mysql', ...} @pytest.mark.test_details("SLUB-T16682","high","LMS Regression","pradeep") def test_SelfServeCohort(self,initialize_pages,testdata): ''' Objective: Verify Self-serve cohort change When Learner Has No Progress Destination Cohort Selected Step 01: Login as learner Step 02: Click on Change Cohort Step 03: From the preference page select cohort Step 04: Give reason for cohort change Step 05: Submit request Step 06: Verify successful page 1.old cohort name/2. new cohort name Step 07: Click on back to dash board page - new cohort should display Step 08: avail of cohort request should change 1 to 2 Step 09: Engaex Verification 1. Go to old cohort/2. In cohort change tab - > aprrove tab -> learner should present Step 10 Mysql Verification 1. Cohort_change_request table - active_cohort_id should be new cohort id/2. learnerprogram tablle active cohort id should new cohort id ''' #read data from CCR_test_data.json file json_data=json.load(open('LMS_regression_testdata.json','r')) email_id=json_data['testdata_for_lms_regression']['learner_cohort_master'] cohort=json_data['testdata_for_lms_regression']['MP_cohort'] #Step 01: Login as learner > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2497: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_CohortChangeRequest_WithoutSelfServe | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164102F40>, initialize_pages = None testdata = {'cohort_change_success_message': 'Cohort Preference Submitted Successfully', 'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': '/dashboard', 'db_type': 'mysql', ...} @pytest.mark.test_details("SLUB-T16683","high","LMS Regression","pradeep") def test_CohortChangeRequest_WithoutSelfServe(self,initialize_pages,testdata): ''' Objective: Verify submit_preferences cohort change When Learner Has No Progress Destination Cohort Selected Step 01: Login as learner Step 02: Click on Change Cohort Step 03: From the preference page select submit preferences Step 04: Give reason for cohort change Step 05: Submit request Step 06: Verify successful page 1.old cohort name/2. new cohort name Step 07: Click on back to dash board page - new cohort should display Step 08: avail of cohort request should change 1 to 2 Step 09: Engaex Verification 1. Go to old cohort/2. In cohort change tab - > aprrove tab -> learner should present Step 10 Mysql Verification 1. Cohort_change_request table - active_cohort_id should be new cohort id/2. learnerprogram tablle active cohort id should new cohort id ''' json_data=json.load(open('LMS_regression_testdata.json','r')) email_id=json_data['testdata_for_lms_regression']['learner_cohort_master'] #cohort=json_data['testdata_for_lms_regression']['MP_cohort'] > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2616: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_B2C_NewUser_SinglePurchase_Seamless | 2.21 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163ECE5E0>, initialize_pages = None testdata = {'asm': '/agile-and-scrum', 'card_name': 'simplilearn', 'coupon_code': 'test99-lp1', 'credit_number': '4111 1111 1111 1111', ...} @pytest.mark.test_details("SLUB-T16684","high","LMS Regression","pradeep") def test_B2C_NewUser_SinglePurchase_Seamless(self,initialize_pages,testdata): ''' Objective: To check the purchase flow for a new user purchasing a single product from the website via seamless payment. Step 01: Purchase a single product for a new user from the website. Step 02: Vertify end to end order purchase flow. ''' pytest.driver.delete_all_cookies() > email_id = TestLMSRegression.create_newUser_(self,testdata) test\test_LMS_Regression_Test.py:2698: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:94: in create_newUser_ pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_B2C_ReturningUser_SinglePurchase_Seamless | 2.15 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231639D28B0>, initialize_pages = None testdata = {'asm': '/agile-and-scrum', 'card_name': 'simplilearn', 'coupon_code': 'test99-lp1', 'credit_number': '4111 1111 1111 1111', ...} @pytest.mark.test_details("SLUB-T16686","high","LMS Regression","pradeep") def test_B2C_ReturningUser_SinglePurchase_Seamless(self,initialize_pages,testdata): ''' Objective: To check the purchase flow for an old user purchasing a single product from the website via seamless payment. Step 01: Purchase a single product for an old user from the website. Step 02: Vertify end to end order purchase flow. ''' pytest.driver.delete_all_cookies() #read data from Json File with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_seamless_purchase'] > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:2774: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_B2C_NewUser_SinglePurchase_CPL | 103.66 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231642338B0>, initialize_pages = None testdata = {'asm': '/agile-and-scrum', 'card_name': 'simplilearn', 'credit_number': '4111 1111 1111 1111', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16685","high","LMS Regression","pradeep") def test_B2C_NewUser_SinglePurchase_CPL(self,initialize_pages,testdata): ''' Objective: To check the purchase flow for a new user purchasing a single product from RevX via CPL creation. Step 01: Purchase a single product for a new user via RevX. Step 02: Vertify end to end order purchase flow. ''' email_id = utils.generate_random_email_regression_() name = testdata['name'] last_name = "testlastname" logging.info(f"email id id : {email_id}") #dump data for future use with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) data['testdata_for_lms_regression']['learner_CPL_single_course']=email_id with open("LMS_regression_testdata.json",'w') as file: json.dump(data,file,indent=4) pytest.driver.delete_all_cookies() salesforce_login_helper.sf_login() # Creating the order/Generating the order for regular > revx_helper.create_payment_single_course(testdata['payment_details'],email_id) test\test_LMS_Regression_Test.py:2854: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\revx_helper.py:47: in create_payment_single_course pytest.driver.get(new_url) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2841 email id id : iris_regression3899@yopmail.com [33mWARNING [0m setup:page_factory.py:57 the locator send_anyway on url https://dockerv2.simplilearn.com:8087/apachedev/git/ice9/backend/public/sso/payment is not present [32mINFO [0m setup:revx_helper.py:45 changing docker to 8085 | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_B2C_ReturningUser_SinglePurchase_CPL | 138.18 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163112AC0>, initialize_pages = None testdata = {'asm': '/agile-and-scrum', 'card_name': 'simplilearn', 'credit_number': '4111 1111 1111 1111', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16687","high","LMS Regression","pradeep") def test_B2C_ReturningUser_SinglePurchase_CPL(self,initialize_pages,testdata): ''' Objective: To check the purchase flow for a Existing learner purchasing a single product from RevX via CPL creation. Step 01: Purchase a single product for a existing user via RevX. Step 02: Vertify end to end order purchase flow. ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_CPL_single_course'] name = testdata['name'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() salesforce_login_helper.sf_login() # Creating the order/Generating the order for regular > revx_helper.create_payment_single_course_second_time(testdata['payment_details'],email_id) test\test_LMS_Regression_Test.py:2962: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\revx_helper.py:148: in create_payment_single_course_second_time pytest.driver.get(new_url) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:2957 test data Loaded [33mWARNING [0m setup:page_factory.py:57 the locator send_anyway on url https://dockerv2.simplilearn.com:8087/apachedev/git/ice9/backend/public/sso/payment is not present [32mINFO [0m setup:revx_helper.py:146 changing docker to 8085 | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_B2C_NewUser_MultiPurchase_CPL | 138.64 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231642437C0>, initialize_pages = None testdata = {'asm': '/agile-and-scrum', 'card_name': 'simplilearn', 'credit_number': '4111 1111 1111 1111', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16688","high","LMS Regression","pradeep") def test_B2C_NewUser_MultiPurchase_CPL(self,initialize_pages,testdata): ''' Objective: To check the purchase flow for a new user purchasing a multiple product from RevX via CPL creation. Step 01: Purchase a multiple product for a new user via RevX. Step 02: Vertify end to end order purchase flow. ''' email_id = utils.generate_random_email_regression_() name = testdata['name'] last_name = "testlastname" logging.info(f"email id id : {email_id}") #dump data for future use with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) data['testdata_for_lms_regression']['learner_CPL_multiple_course']=email_id with open("LMS_regression_testdata.json",'w') as file: json.dump(data,file,indent=4) logging.info("test data Loaded") pytest.driver.delete_all_cookies() salesforce_login_helper.sf_login() # Creating the order/Generating the order for regular > revx_helper.create_payment_multiple_course(testdata['payment_details'],email_id) test\test_LMS_Regression_Test.py:3060: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\revx_helper.py:247: in create_payment_multiple_course pytest.driver.get(new_url) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:3046 email id id : iris_regression9948@yopmail.com [32mINFO [0m setup:test_LMS_Regression_Test.py:3055 test data Loaded [33mWARNING [0m setup:page_factory.py:57 the locator send_anyway on url https://dockerv2.simplilearn.com:8087/apachedev/git/ice9/backend/public/sso/payment is not present [32mINFO [0m setup:revx_helper.py:245 changing docker to 8085 | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_B2C_ReturningUser_MultiPurchase_CPL | 134.10 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162CBF250>, initialize_pages = None testdata = {'asm': '/agile-and-scrum', 'card_name': 'simplilearn', 'credit_number': '4111 1111 1111 1111', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16689","high","LMS Regression","pradeep") def test_B2C_ReturningUser_MultiPurchase_CPL(self,initialize_pages,testdata): ''' Objective: To check the purchase flow for a Existing purchasing a multiple product from RevX via CPL creation. Step 01: Purchase a multiple product for a new existing via RevX. Step 02: Vertify end to end order purchase flow. ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_CPL_multiple_course'] name = testdata['name'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() salesforce_login_helper.sf_login() # Creating the order/Generating the order for regular > revx_helper.create_payment_multiple_course_second_time(testdata['payment_details'],email_id) test\test_LMS_Regression_Test.py:3167: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\revx_helper.py:357: in create_payment_multiple_course_second_time pytest.driver.get(new_url) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:3162 test data Loaded [33mWARNING [0m setup:page_factory.py:57 the locator send_anyway on url https://dockerv2.simplilearn.com:8087/apachedev/git/ice9/backend/public/sso/payment is not present [32mINFO [0m setup:revx_helper.py:355 changing docker to 8085 | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_ProgramExpiry_CohortExpiryLessThanMaterProgramExpiry | 2.24 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162A39BE0>, initialize_pages = None testdata = {'cohort_home_url': '/dashboard', 'email': 'admin@simplilearn.com', 'home_url': '/dashboard', 'onboarding_url': 'dashboard/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T16677","high","LMS Regression","Pradeep") def test_ProgramExpiry_CohortExpiryLessThanMaterProgramExpiry(self,initialize_pages,testdata): ''' Objective : ProgramExpiry_CohortExpiryLessThanMaterProgramExpiry. ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['learner_cohort_master'] cohort = data['testdata_for_lms_regression']['MP_cohort'] logging.info("test data Loaded") pytest.driver.delete_all_cookies() > lms_login_helper.new_b2c_login(email_id,testdata['password']) test\test_LMS_Regression_Test.py:3256: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:193: in new_b2c_login pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:3253 test data Loaded | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_ProgramExpiry_CohortExpiryGreaterThanMaterProgramExpiry | 2.21 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162CE3DF0>, initialize_pages = None testdata = {'admin_url': '/admin', 'bundle_id': '163', 'cohort_home_url': '/dashboard', 'cohort_mp': 'mp', ...} @pytest.mark.test_details("SLUB-T16676","high","LMS Regression","Pradeep") def test_ProgramExpiry_CohortExpiryGreaterThanMaterProgramExpiry(self,initialize_pages,testdata): ''' Objective : ProgramExpiry_CohortExpiryGreaterThanMaterProgramExpiry ''' #Step 01: Execute the test case > email_id = TestLMSRegression.create_newUser(self,testdata) test\test_LMS_Regression_Test.py:3335: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:56: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_AddLearner | 2.20 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023162A596D0>, initialize_pages = None testdata = {'admin_url': '/admin', 'dashboard_url': '/dashboard', 'email': 'admin@simplilearn.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T16681","high","LMS Regression","Pradeep") def test_AddLearner(self,initialize_pages,testdata): ''' Objective : ProgramExpiry_CohortExpiryGreaterThanMaterProgramExpiry ''' #Step 01: Execute the test case with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) cohort=data['testdata_for_lms_regression']['University_cohort'] > email_id = TestLMSRegression.create_newUser(self,testdata) test\test_LMS_Regression_Test.py:3472: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:56: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2CLearner_removeLearner | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231647BDBE0>, initialize_pages = None testdata = {'admin_url': '/admin', 'bundle_id': '163', 'bundle_name': 'Data Scientist', 'course_id': '163', ...} @pytest.mark.test_details("SLUB-T18079","high","LMS Regression","Pradeep") def test_Verify_B2CLearner_removeLearner(self,initialize_pages,testdata): ''' Objective : This test is to verify that the learner should be removed with the cohort and initial program expiry days should be resetted to the learner Step 01: Execute the TC Step 02: Perform Remove LEarner Step 03: Verify the data on lms Step 04: Verify the Cohort change request table Step 05: Verify the Access days from the program card ''' #Step 01: Execute the TC with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) cohort_name=data['testdata_for_lms_regression']['b2b_master_cohort1'] pytest.driver.delete_all_cookies() > email_id = TestLMSRegression.create_newUser(self,testdata) test\test_LMS_Regression_Test.py:3584: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_LMS_Regression_Test.py:56: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2CLearner_AddLearner | 0.00 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164B26790>, initialize_pages = None testdata = {'bundle_id': '163', 'cohort_mp': 'mp', 'course_mp': 'Full Stack Java Developer - 163', 'course_pgp': 'Post Graduate Program in Data Science - 156', ...} @pytest.mark.test_details("SLUB-T18080","high","LMS Regression","Pradeep") def test_Verify_B2CLearner_AddLearner(self,initialize_pages,testdata): ''' Objective : This test is to verify that the learner should be added with the cohort and initial program expiry days should be resetted to the cohort expiry if it is greater than program expiry Step 01: Execute the TC Step 02: Create cohort & announce classes Step 03: Perform ADDLEarner Step 04: Verify the data on lms Step 05: Verify the Cohort change request table Step 06: Verify the Access days from the program card ''' #Step 01: Execute the TC with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) cohort_name=data['testdata_for_lms_regression']['b2b_master_cohort2'] > email_id = email_id_for_next_use[0] E IndexError: list index out of range test\test_LMS_Regression_Test.py:3734: IndexError | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BLMS_ScormLearnerAccesstoCourse | 2.22 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163D37070>, initialize_pages = None testdata = {'b2b_admin_dashboard': '/public/affiliate', 'email': 'admin@simplilearn.com', 'enterprise_id': '1323', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T18069","high","LMS Regression","Pradeep") def test_Verify_B2BLMS_ScormLearnerAccesstoCourse(self,initialize_pages,testdata): ''' Objective : This test is to verify that the new learner should be assigned the program successfully Step 01: Create cohort & announce classes Step 02: Assign the program Step 03: verify the cohort is assigned successfully ''' email_id = utils.generate_random_email_regression_b2b() logging.info(email_id) > lms_login_helper.b2b_admin_login(pytest.config['admin']['email'],pytest.config['admin']['password']) test\test_LMS_Regression_Test.py:3828: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:261: in b2b_admin_login pytest.driver.get(pytest.config['2b2_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:3826 irisregressiontestb2b+gwi@yopmail.com | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BLMS_XAPI | 2.17 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163F26AC0>, initialize_pages = None testdata = {'b2b_admin_dashboard': '/public/affiliate', 'email': 'admin@simplilearn.com', 'enterprise_id': '1323', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T18070","high","LMS Regression","Pradeep") def test_Verify_B2BLMS_XAPI(self,initialize_pages,testdata): ''' Objective : This test is to verify that the xapi access should be done successfully Step 01: Create cohort & announce classes Step 02: Assign the program Step 03: verify the cohort is assigned successfully ''' email_id = utils.generate_random_email_regression_b2b() logging.info(email_id) > lms_login_helper.b2b_admin_login(pytest.config['admin']['email'],pytest.config['admin']['password']) test\test_LMS_Regression_Test.py:3882: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:261: in b2b_admin_login pytest.driver.get(pytest.config['2b2_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:3880 irisregressiontestb2b+gfe@yopmail.com | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BAssignment_EntAdmin_CohortProgram_NewUser | 195.86 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164B68EE0>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Full Stack Java Developer-163', 'cohort_mp': 'mp', ...} @pytest.mark.test_details("SLUB-T18071","high","LMS Regression","Pradeep") def test_Verify_B2BAssignment_EntAdmin_CohortProgram_NewUser(self,initialize_pages,testdata): ''' Objective : This test is to verify that the new learner should be assigned the program successfully Step 01: Create cohort & announce classes Step 02: Assign the program Step 03: verify the cohort is assigned successfully ''' #step 01 : Create cohort & announce classes #create Cohort lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['dashboard_url']) > self.pg_cohort.click_new_cohort() test\test_LMS_Regression_Test.py:3949: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\cohorts_page.py:26: in click_new_cohort self.mod_cohorts.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.cohorts_page.CohortsPage object at 0x00000231645E1BB0>, loc = 'mod_cohorts' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_cohorts core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//ul[@id='side-menu']//a)[8]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_cohorts on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BAssignment_EntAdmin_UniversityProgram_NewUser | 198.23 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x00000231645E1730>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Post Graduate Program in Data Science-156', 'cohort_mp': 'mp', ...} @pytest.mark.test_details("SLUB-T18072","high","LMS Regression","Pradeep") def test_Verify_B2BAssignment_EntAdmin_UniversityProgram_NewUser(self,initialize_pages,testdata): ''' Objective : This test is to verify that the new learner should be assigned the program successfully Step 01: Create cohort & announce classes Step 02: Assign the program Step 03: verify the cohort is assigned successfully ''' #step 01 : Create cohort & announce classes #create Cohort lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['dashboard_url']) > self.pg_cohort.click_new_cohort() test\test_LMS_Regression_Test.py:4069: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\cohorts_page.py:26: in click_new_cohort self.mod_cohorts.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.cohorts_page.CohortsPage object at 0x0000023164A44D30>, loc = 'mod_cohorts' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_cohorts core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//ul[@id='side-menu']//a)[8]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_cohorts on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BAssignment_EntAdmin_ClassicProgram_NewUser | 5.58 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023163F16940>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Learning Structure bundle-1-294', 'confirm_password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T18073","high","LMS Regression","Pradeep") def test_Verify_B2BAssignment_EntAdmin_ClassicProgram_NewUser(self,initialize_pages,testdata): ''' Objective : This test is to verify that the new learner should be assigned the program successfully Step 01: Assign the program ''' name= utils.generate_random_name_regression_b2b() email_id=utils.generate_random_email_regression_b2b() > lms_login_helper.xenia_new_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:4174: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:286: in xenia_new_login pytest.driver.get(pytest.config['xenia_url_new']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_verify_B2BAssignment_EntAdmin_CertificationCourse | 5.51 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164496460>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Core Java Certification Training', 'confirm_password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T18074","high","LMS Regression","Pradeep") def test_verify_B2BAssignment_EntAdmin_CertificationCourse(self,initialize_pages,testdata): ''' Objective : This test is to verify that the new learner should be assigned the course successfully Step 01: Assign the program ''' name= utils.generate_random_name_regression_b2b() email_id=utils.generate_random_email_regression_b2b() > lms_login_helper.xenia_new_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:4250: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:286: in xenia_new_login pytest.driver.get(pytest.config['xenia_url_new']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BAssignment_EntAdmin_CohortProgram_ExistingUser | 257.96 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316460CD00>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Full Stack Java Developer-163', 'cohort_mp': 'mp', ...} @pytest.mark.test_details("SLUB-T18075","high","LMS Regression","Pradeep") def test_Verify_B2BAssignment_EntAdmin_CohortProgram_ExistingUser(self,initialize_pages,testdata): ''' Objective : This test is to verify that the existinglearner should be assigned the program successfully Step 01: Create cohort & announce classes Step 02: Assign the program Step 03: verify the cohort is assigned successfully ''' #step 01 : Create cohort & announce classes #create Cohort lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['dashboard_url']) selenium_helper.is_element_present(self.pg_cohort.locators['upcomming_cohort_1stPage'][0],60) time.sleep(2) > self.pg_cohort.click_new_cohort() test\test_LMS_Regression_Test.py:4334: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\cohorts_page.py:26: in click_new_cohort self.mod_cohorts.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.cohorts_page.CohortsPage object at 0x0000023164D98D90>, loc = 'mod_cohorts' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_cohorts core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//a[contains(text(),'1')])[1]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//ul[@id='side-menu']//a)[8]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_cohorts on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BAssignment_EntAdmin_UniversityProgram_ExistingUser | 258.26 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164D9E3A0>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Post Graduate Program in Data Science-156', 'cohort_mp': 'pgp', ...} @pytest.mark.test_details("SLUB-T18076","high","LMS Regression","Pradeep") def test_Verify_B2BAssignment_EntAdmin_UniversityProgram_ExistingUser(self,initialize_pages,testdata): ''' Objective : This test is to verify that the existinglearner should be assigned the program successfully Step 01: Create cohort & announce classes Step 02: Assign the program Step 03: verify the cohort is assigned successfully ''' #step 01 : Create cohort & announce classes #create Cohort lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['dashboard_url']) selenium_helper.is_element_present(self.pg_cohort.locators['upcomming_cohort_1stPage'][0],60) time.sleep(2) > self.pg_cohort.click_new_cohort() test\test_LMS_Regression_Test.py:4439: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\cohorts_page.py:26: in click_new_cohort self.mod_cohorts.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.cohorts_page.CohortsPage object at 0x0000023164D9E760>, loc = 'mod_cohorts' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_cohorts core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//a[contains(text(),'1')])[1]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//ul[@id='side-menu']//a)[8]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_cohorts on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BAssignment_EntAdmin_ClassicProgram_ExistingUser | 5.62 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164E9B9D0>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Data Scientistsshhhzzz-67', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18077","high","LMS Regression","Pradeep") def test_Verify_B2BAssignment_EntAdmin_ClassicProgram_ExistingUser(self,initialize_pages,testdata): ''' Objective : This test is to verify that the new learner should be assigned the program successfully Step 01: Assign the program ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['b2b_classic_learner1'] > lms_login_helper.xenia_new_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:4528: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:286: in xenia_new_login pytest.driver.get(pytest.config['xenia_url_new']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_verify_B2BAssignment_EntAdmin_CertificationCourse_existinguser | 5.82 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164F6C7C0>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Big Data Hadoop and Spark Developer', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18078","high","LMS Regression","Pradeep") def test_verify_B2BAssignment_EntAdmin_CertificationCourse_existinguser(self,initialize_pages,testdata): ''' Objective : This test is to verify that the new learner should be assigned the program successfully Step 01: Assign the program ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['b2b_certification_learner1'] pytest.driver.delete_all_cookies() > lms_login_helper.xenia_new_login(testdata['email'],testdata['password']) test\test_LMS_Regression_Test.py:4588: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:286: in xenia_new_login pytest.driver.get(pytest.config['xenia_url_new']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_ELVCAssignment_AutoRegisterEnable | 210.98 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164F7B250>, initialize_pages = None testdata = {'b2b_admin_dashboard': '/public/affiliate', 'course_name': 'Data Science with R Programming', 'dashboard_url': '/dashboard', 'email': 'admin@simplilearn.com', ...} @pytest.mark.test_details("SLUB-T18083","high","LMS Regression","Pradeep") def test_Verify_ELVCAssignment_AutoRegisterEnable(self,initialize_pages,testdata): ''' Objective : This test is to verify that the ELVC should be created and assigned to learner successfully Step 01: verify_B2BAssignment_EntAdmin_CertificationCourse Step 03: Create the ELVC and enable Auto Register Step 03: Login to enterprise admin portal Step 04: Select the course and click on exclusive live class Step 05: Search the class created in Step2 Step 06: Assign the class Step 07: Login to learner's lms and verify the class tab ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['b2b_certification_learner1'] lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['dashboard_url']) > elvc_class = self.pg_elvc.createElvcFlexiClass(testdata['course_name']) test\test_LMS_Regression_Test.py:4657: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\b2b_ELVC.py:21: in createElvcFlexiClass self.mod_liveclasses.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.b2b_ELVC.B2BELVC object at 0x0000023164F7BF70>, loc = 'mod_liveclasses' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_liveclasses core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//a[contains(text(),'1')])[1]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_liveclasses on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_ELVCAssignment_AutoRegisterDisable | 206.36 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164E772B0>, initialize_pages = None testdata = {'b2b_admin_dashboard': '/public/affiliate', 'course_name': 'Machine Learning', 'dashboard_url': '/dashboard', 'email': 'admin@simplilearn.com', ...} @pytest.mark.test_details("SLUB-T18084","high","LMS Regression","Pradeep") def test_Verify_ELVCAssignment_AutoRegisterDisable(self,initialize_pages,testdata): ''' Objective : This test is to verify that the ELVC should be created and learner should be able to register successfully Step 01: verify_B2BAssignment_EntAdmin_CertificationCourse Step 02: Create the ELVC and enable Auto Register Step 03: Login to enterprise admin portal Step 04: Select the course and click on exclusive live class Step 05: Search the class created in Step2 Step 06: Assign the class Step 07: Login to learner's lms and verify the class tab ''' with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) email_id=data['testdata_for_lms_regression']['b2b_certification_learner1'] lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['dashboard_url']) > elvc_class = self.pg_elvc.createElvcFlexiClass_without_auroRegister(testdata['course_name']) test\test_LMS_Regression_Test.py:4718: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\b2b_ELVC.py:80: in createElvcFlexiClass_without_auroRegister self.mod_liveclasses.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.b2b_ELVC.B2BELVC object at 0x0000023164E72A00>, loc = 'mod_liveclasses' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_liveclasses core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//a[contains(text(),'1')])[1]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_liveclasses on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BLearner_removeLearner | 2.33 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023164E72910>, initialize_pages = None testdata = {'bundle_id': '163', 'dashboard_url': '/dashboard', 'db_type': 'mysql', 'email': 'admin@simplilearn.com', ...} @pytest.mark.test_details("SLUB-T18081","high","LMS Regression","Pradeep") def test_Verify_B2BLearner_removeLearner(self,initialize_pages,testdata): ''' Objective : This test is to verify that the learner should be removed with the cohort and initial program expiry days should be resetted to the learner Step 01: Execute the TC Step 02: Perform Remove LEarner Step 03: Verify the data on lms Step 04: Verify the Cohort change request table Step 05: Verify the Access days from the program card ''' #Step 01: Execute the TC with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) cohort_name=data['testdata_for_lms_regression']['b2b_master_cohort2'] email_id = data['testdata_for_lms_regression']['b2b_university_learner1'] #verify data before Cohort Removal > lms_login_helper.b2b_learner_login_new(email_id,testdata['password']) test\test_LMS_Regression_Test.py:4780: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:252: in b2b_learner_login_new pytest.driver.get(pytest.config['b2b_learner_login_new']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_Verify_B2BLearner_AddLearner | 2.19 | |
self = <test_LMS_Regression_Test.TestLMSRegression object at 0x0000023165083550>, initialize_pages = None testdata = {'bundle_id': '163', 'dashboard_url': '/dashboard', 'db_type': 'mysql', 'email': 'admin@simplilearn.com', ...} @pytest.mark.test_details("SLUB-T18082","high","LMS Regression","Pradeep") def test_Verify_B2BLearner_AddLearner(self,initialize_pages,testdata): ''' Objective : This test is to verify that the learner should be added with the cohort and initial program expiry days should be resetted to the cohort expiry if it is greater than program expiry Step 01: Execute the TC Step 02: Create cohort & announce classes Step 03: Perform ADDLEarner Step 04: Verify the data on lms Step 05: Verify the Cohort change request table Step 06: Verify the Access days from the program card ''' #Step 01: Execute the TC #Step 02: Create cohort & announce classes with open("LMS_regression_testdata.json",'r') as file: data=json.load(file) cohort_name=data['testdata_for_lms_regression']['b2b_master_cohort1'] email_id = data['testdata_for_lms_regression']['b2b_university_learner1'] logging.info(f"Learner Email id : {email_id}") #verify data before Cohort Removal > lms_login_helper.b2b_learner_login_new(email_id,testdata['password']) test\test_LMS_Regression_Test.py:4881: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:252: in b2b_learner_login_new pytest.driver.get(pytest.config['b2b_learner_login_new']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_LMS_Regression_Test.py:4879 Learner Email id : irisregressiontestb2b+zht@yopmail.com | |||
Failed | test_LMS_Regression_Test.py::TestLMSRegression::test_MigrationScript_VerifyClassRegisterationCount | 42.23 | |
self = <urllib3.connection.HTTPSConnection object at 0x0000023165477790> def _new_conn(self): """ Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: > conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\connection.py:159: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('workshop.simplilearn.com', 443), timeout = None, source_address = None, socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) sock.connect(sa) return sock except socket.error as e: err = e if sock is not None: sock.close() sock = None if err is not None: > raise err c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\util\connection.py:84: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ address = ('workshop.simplilearn.com', 443), timeout = None, source_address = None, socket_options = [(6, 1, 1)] def create_connection( address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None, socket_options=None, ): """Connect to *address* and return the socket object. Convenience function. Connect to *address* (a 2-tuple ``(host, port)``) and return the socket object. Passing the optional *timeout* parameter will set the timeout on the socket instance before attempting to connect. If no *timeout* is supplied, the global default timeout setting returned by :func:`getdefaulttimeout` is used. If *source_address* is set it must be a tuple of (host, port) for the socket to bind as a source address before making the connection. An host of '' or port 0 tells the OS to use the default. """ host, port = address if host.startswith("["): host = host.strip("[]") err = None # Using the value from allowed_gai_family() in the context of getaddrinfo lets # us select whether to work with IPv4 DNS records, IPv6 records, or both. # The original create_connection function always returns all records. family = allowed_gai_family() for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): af, socktype, proto, canonname, sa = res sock = None try: sock = socket.socket(af, socktype, proto) # If provided, set socket level options before connecting. _set_socket_options(sock, socket_options) if timeout is not socket._GLOBAL_DEFAULT_TIMEOUT: sock.settimeout(timeout) if source_address: sock.bind(source_address) > sock.connect(sa) E TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\util\connection.py:74: TimeoutError During handling of the above exception, another exception occurred: self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x0000023165477B20>, method = 'POST' url = '/api/v2/workshops/list-by-filter', body = 'status=1' headers = {'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-aliv...8', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic bnVjbGV1czppYW1hbHZjbWljcm9zZXJ2aWNl'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None), redirect = False assert_same_host = False, timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False}, conn = None, release_this_conn = True, err = None clean_exit = False, timeout_obj = Timeout(connect=None, read=None, total=None), is_new_proxy_conn = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param body: Data to send in the request body (useful for creating POST requests, see HTTPConnectionPool.post_url for more convenience). :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When False, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parse_url(url).url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] <https://github.com/urllib3/urllib3/issues/651> release_this_conn = release_conn # Merge the proxy headers. Only do this in HTTP. We have to copy the # headers dict so we can safely change it without those changes being # reflected in anyone else's copy. if self.scheme == "http": headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn: self._prepare_proxy(conn) # Make the request on the httplib connection object. > httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\connectionpool.py:670: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x0000023165477B20> conn = <urllib3.connection.HTTPSConnection object at 0x0000023165477790>, method = 'POST' url = '/api/v2/workshops/list-by-filter', timeout = Timeout(connect=None, read=None, total=None), chunked = False httplib_request_kw = {'body': 'status=1', 'headers': {'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept':...', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic bnVjbGV1czppYW1hbHZjbWljcm9zZXJ2aWNl'}} timeout_obj = Timeout(connect=None, read=None, total=None) def _make_request( self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw ): """ Perform a request on a given urllib connection object taken from our pool. :param conn: a connection from one of our connection pools :param timeout: Socket timeout in seconds for the request. This can be a float or integer, which will set the same timeout value for the socket connect and the socket read, or an instance of :class:`urllib3.util.Timeout`, which gives you more fine-grained control over your timeouts. """ self.num_requests += 1 timeout_obj = self._get_timeout(timeout) timeout_obj.start_connect() conn.timeout = timeout_obj.connect_timeout # Trigger any extra validation we need to do. try: > self._validate_conn(conn) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\connectionpool.py:381: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x0000023165477B20> conn = <urllib3.connection.HTTPSConnection object at 0x0000023165477790> def _validate_conn(self, conn): """ Called right before a request is made, after the socket is created. """ super(HTTPSConnectionPool, self)._validate_conn(conn) # Force connect early to allow us to validate the connection. if not getattr(conn, "sock", None): # AppEngine might not have `.sock` > conn.connect() c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\connectionpool.py:978: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <urllib3.connection.HTTPSConnection object at 0x0000023165477790> def connect(self): # Add certificate verification > conn = self._new_conn() c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\connection.py:309: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <urllib3.connection.HTTPSConnection object at 0x0000023165477790> def _new_conn(self): """ Establish a socket connection and set nodelay settings on it. :return: New socket connection. """ extra_kw = {} if self.source_address: extra_kw["source_address"] = self.source_address if self.socket_options: extra_kw["socket_options"] = self.socket_options try: conn = connection.create_connection( (self._dns_host, self.port), self.timeout, **extra_kw ) except SocketTimeout: raise ConnectTimeoutError( self, "Connection to %s timed out. (connect timeout=%s)" % (self.host, self.timeout), ) except SocketError as e: > raise NewConnectionError( self, "Failed to establish a new connection: %s" % e ) E urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000023165477790>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\connection.py:171: NewConnectionError During handling of the above exception, another exception occurred: self = <requests.adapters.HTTPAdapter object at 0x000002316326A8B0>, request = <PreparedRequest [POST]>, stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True, cert = None, proxies = OrderedDict() def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest <PreparedRequest>` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) <timeouts>` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection(request.url, proxies) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies) chunked = not (request.body is None or 'Content-Length' in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError as e: # this may raise a string formatting error. err = ("Invalid timeout {}. Pass a (connect, read) " "timeout tuple, or a single float to set " "both timeouts to the same value".format(timeout)) raise ValueError(err) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: if not chunked: > resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout ) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\requests\adapters.py:439: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <urllib3.connectionpool.HTTPSConnectionPool object at 0x0000023165477B20>, method = 'POST' url = '/api/v2/workshops/list-by-filter', body = 'status=1' headers = {'User-Agent': 'python-requests/2.24.0', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-aliv...8', 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization': 'Basic bnVjbGV1czppYW1hbHZjbWljcm9zZXJ2aWNl'} retries = Retry(total=0, connect=None, read=False, redirect=None, status=None), redirect = False assert_same_host = False, timeout = Timeout(connect=None, read=None, total=None), pool_timeout = None release_conn = False, chunked = False, body_pos = None response_kw = {'decode_content': False, 'preload_content': False}, conn = None, release_this_conn = True, err = None clean_exit = False, timeout_obj = Timeout(connect=None, read=None, total=None), is_new_proxy_conn = False def urlopen( self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw ): """ Get a connection from the pool and perform an HTTP request. This is the lowest level call for making a request, so you'll need to specify all the raw details. .. note:: More commonly, it's appropriate to use a convenience method provided by :class:`.RequestMethods`, such as :meth:`request`. .. note:: `release_conn` will only behave as expected if `preload_content=False` because we want to make `preload_content=False` the default behaviour someday soon without breaking backwards compatibility. :param method: HTTP request method (such as GET, POST, PUT, etc.) :param body: Data to send in the request body (useful for creating POST requests, see HTTPConnectionPool.post_url for more convenience). :param headers: Dictionary of custom headers to send, such as User-Agent, If-None-Match, etc. If None, pool headers are used. If provided, these headers completely replace any pool-specific headers. :param retries: Configure the number of retries to allow before raising a :class:`~urllib3.exceptions.MaxRetryError` exception. Pass ``None`` to retry until you receive a response. Pass a :class:`~urllib3.util.retry.Retry` object for fine-grained control over different types of retries. Pass an integer number to retry connection errors that many times, but no other types of errors. Pass zero to never retry. If ``False``, then retries are disabled and any exception is raised immediately. Also, instead of raising a MaxRetryError on redirects, the redirect response will be returned. :type retries: :class:`~urllib3.util.retry.Retry`, False, or an int. :param redirect: If True, automatically handle redirects (status codes 301, 302, 303, 307, 308). Each redirect counts as a retry. Disabling retries will disable redirect, too. :param assert_same_host: If ``True``, will make sure that the host of the pool requests is consistent else will raise HostChangedError. When False, you can use the pool on an HTTP proxy and request foreign hosts. :param timeout: If specified, overrides the default timeout for this one request. It may be a float (in seconds) or an instance of :class:`urllib3.util.Timeout`. :param pool_timeout: If set and the pool is set to block=True, then this method will block for ``pool_timeout`` seconds and raise EmptyPoolError if no connection is available within the time period. :param release_conn: If False, then the urlopen call will not release the connection back into the pool once a response is received (but will release if you read the entire contents of the response such as when `preload_content=True`). This is useful if you're not preloading the response's content immediately. You will need to call ``r.release_conn()`` on the response ``r`` to return the connection back into the pool. If None, it takes the value of ``response_kw.get('preload_content', True)``. :param chunked: If True, urllib3 will send the body using chunked transfer encoding. Otherwise, urllib3 will send the body using the standard content-length form. Defaults to False. :param int body_pos: Position to seek to in file-like body in the event of a retry or redirect. Typically this won't need to be set because urllib3 will auto-populate the value when needed. :param \\**response_kw: Additional parameters are passed to :meth:`urllib3.response.HTTPResponse.from_httplib` """ if headers is None: headers = self.headers if not isinstance(retries, Retry): retries = Retry.from_int(retries, redirect=redirect, default=self.retries) if release_conn is None: release_conn = response_kw.get("preload_content", True) # Check host if assert_same_host and not self.is_same_host(url): raise HostChangedError(self, url, retries) # Ensure that the URL we're connecting to is properly encoded if url.startswith("/"): url = six.ensure_str(_encode_target(url)) else: url = six.ensure_str(parse_url(url).url) conn = None # Track whether `conn` needs to be released before # returning/raising/recursing. Update this variable if necessary, and # leave `release_conn` constant throughout the function. That way, if # the function recurses, the original value of `release_conn` will be # passed down into the recursive call, and its value will be respected. # # See issue #651 [1] for details. # # [1] <https://github.com/urllib3/urllib3/issues/651> release_this_conn = release_conn # Merge the proxy headers. Only do this in HTTP. We have to copy the # headers dict so we can safely change it without those changes being # reflected in anyone else's copy. if self.scheme == "http": headers = headers.copy() headers.update(self.proxy_headers) # Must keep the exception bound to a separate variable or else Python 3 # complains about UnboundLocalError. err = None # Keep track of whether we cleanly exited the except block. This # ensures we do proper cleanup in finally. clean_exit = False # Rewind body position, if needed. Record current position # for future rewinds in the event of a redirect/retry. body_pos = set_file_position(body, body_pos) try: # Request a connection from the queue. timeout_obj = self._get_timeout(timeout) conn = self._get_conn(timeout=pool_timeout) conn.timeout = timeout_obj.connect_timeout is_new_proxy_conn = self.proxy is not None and not getattr( conn, "sock", None ) if is_new_proxy_conn: self._prepare_proxy(conn) # Make the request on the httplib connection object. httplib_response = self._make_request( conn, method, url, timeout=timeout_obj, body=body, headers=headers, chunked=chunked, ) # If we're going to release the connection in ``finally:``, then # the response doesn't need to know about the connection. Otherwise # it will also try to release it and we'll have a double-release # mess. response_conn = conn if not release_conn else None # Pass method to Response for length checking response_kw["request_method"] = method # Import httplib's response into our own wrapper object response = self.ResponseCls.from_httplib( httplib_response, pool=self, connection=response_conn, retries=retries, **response_kw ) # Everything went great! clean_exit = True except EmptyPoolError: # Didn't get a connection from the pool, no need to clean up clean_exit = True release_this_conn = False raise except ( TimeoutError, HTTPException, SocketError, ProtocolError, BaseSSLError, SSLError, CertificateError, ) as e: # Discard the connection for these exceptions. It will be # replaced during the next _get_conn() call. clean_exit = False if isinstance(e, (BaseSSLError, CertificateError)): e = SSLError(e) elif isinstance(e, (SocketError, NewConnectionError)) and self.proxy: e = ProxyError("Cannot connect to proxy.", e) elif isinstance(e, (SocketError, HTTPException)): e = ProtocolError("Connection aborted.", e) > retries = retries.increment( method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] ) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\connectionpool.py:726: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Retry(total=0, connect=None, read=False, redirect=None, status=None), method = 'POST' url = '/api/v2/workshops/list-by-filter', response = None error = NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000023165477790>: Failed to establish a new conne...roperly respond after a period of time, or established connection failed because connected host has failed to respond') _pool = <urllib3.connectionpool.HTTPSConnectionPool object at 0x0000023165477B20> _stacktrace = <traceback object at 0x0000023165623D40> def increment( self, method=None, url=None, response=None, error=None, _pool=None, _stacktrace=None, ): """ Return a new Retry object with incremented retry counters. :param response: A response object, or None, if the server did not return a response. :type response: :class:`~urllib3.response.HTTPResponse` :param Exception error: An error encountered during the request, or None if the response was received successfully. :return: A new ``Retry`` object. """ if self.total is False and error: # Disabled, indicate to re-raise the error. raise six.reraise(type(error), error, _stacktrace) total = self.total if total is not None: total -= 1 connect = self.connect read = self.read redirect = self.redirect status_count = self.status cause = "unknown" status = None redirect_location = None if error and self._is_connection_error(error): # Connect retry? if connect is False: raise six.reraise(type(error), error, _stacktrace) elif connect is not None: connect -= 1 elif error and self._is_read_error(error): # Read retry? if read is False or not self._is_method_retryable(method): raise six.reraise(type(error), error, _stacktrace) elif read is not None: read -= 1 elif response and response.get_redirect_location(): # Redirect retry? if redirect is not None: redirect -= 1 cause = "too many redirects" redirect_location = response.get_redirect_location() status = response.status else: # Incrementing because of a server error like a 500 in # status_forcelist and a the given method is in the whitelist cause = ResponseError.GENERIC_ERROR if response and response.status: if status_count is not None: status_count -= 1 cause = ResponseError.SPECIFIC_ERROR.format(status_code=response.status) status = response.status history = self.history + ( RequestHistory(method, url, error, status, redirect_location), ) new_retry = self.new( total=total, connect=connect, read=read, redirect=redirect, status=status_count, history=history, ) if new_retry.is_exhausted(): > raise MaxRetryError(_pool, url, error or ResponseError(cause)) E urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='workshop.simplilearn.com', port=443): Max retries exceeded with url: /api/v2/workshops/list-by-filter (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000023165477790>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\urllib3\util\retry.py:439: MaxRetryError During handling of the above exception, another exception occurred: self = <test_LMS_Regression_Test.TestLMSRegression object at 0x000002316326A700>, initialize_pages = None testdata = {'api': '/api/v2/workshops/list-by-filter', 'api_password': 'iamalvcmicroservice', 'api_user': 'nucleus', 'db_type': 'mysql', ...} @pytest.mark.test_details("SLUB-T18093","high","LMS Regression","Pradeep") def test_MigrationScript_VerifyClassRegisterationCount(self,initialize_pages,testdata): ''' Objective : This script is to verify the class data from mysql db and mongo db successfully Step 01: "Capture the Active session based on category from Jupiter.class table for: ElearningID,CourseID,WebexSessionID,Max Head Count, Regusteration Count, isSold flag, isWelcome, Cohort_id" Step 02: "Capture the Active session based on category from Workshop collections from Mongo db table for: ElearningID,CourseID,WebexSessionID,Max Head Count, Regusteration Count, isSold flag, isWelcome, Cohort_id" Step 03: "Any discrepancy w.r.t. the session id should be logged for * Mismatch of isSold Flag * Mismatch of Registeration Count * Mismatch of Cohort id" ''' api_url = pytest.config['api_prod']+testdata['api'] filter_text={'status':1} > response = requests.post(api_url,data=filter_text,auth=(testdata['api_user'],testdata['api_password'])) test\test_LMS_Regression_Test.py:4968: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\requests\api.py:119: in post return request('post', url, data=data, json=json, **kwargs) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\requests\api.py:61: in request return session.request(method=method, url=url, **kwargs) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\requests\sessions.py:530: in request resp = self.send(prep, **send_kwargs) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\requests\sessions.py:643: in send r = adapter.send(request, **kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <requests.adapters.HTTPAdapter object at 0x000002316326A8B0>, request = <PreparedRequest [POST]>, stream = False timeout = Timeout(connect=None, read=None, total=None), verify = True, cert = None, proxies = OrderedDict() def send(self, request, stream=False, timeout=None, verify=True, cert=None, proxies=None): """Sends PreparedRequest object. Returns Response object. :param request: The :class:`PreparedRequest <PreparedRequest>` being sent. :param stream: (optional) Whether to stream the request content. :param timeout: (optional) How long to wait for the server to send data before giving up, as a float, or a :ref:`(connect timeout, read timeout) <timeouts>` tuple. :type timeout: float or tuple or urllib3 Timeout object :param verify: (optional) Either a boolean, in which case it controls whether we verify the server's TLS certificate, or a string, in which case it must be a path to a CA bundle to use :param cert: (optional) Any user-provided SSL certificate to be trusted. :param proxies: (optional) The proxies dictionary to apply to the request. :rtype: requests.Response """ try: conn = self.get_connection(request.url, proxies) except LocationValueError as e: raise InvalidURL(e, request=request) self.cert_verify(conn, request.url, verify, cert) url = self.request_url(request, proxies) self.add_headers(request, stream=stream, timeout=timeout, verify=verify, cert=cert, proxies=proxies) chunked = not (request.body is None or 'Content-Length' in request.headers) if isinstance(timeout, tuple): try: connect, read = timeout timeout = TimeoutSauce(connect=connect, read=read) except ValueError as e: # this may raise a string formatting error. err = ("Invalid timeout {}. Pass a (connect, read) " "timeout tuple, or a single float to set " "both timeouts to the same value".format(timeout)) raise ValueError(err) elif isinstance(timeout, TimeoutSauce): pass else: timeout = TimeoutSauce(connect=timeout, read=timeout) try: if not chunked: resp = conn.urlopen( method=request.method, url=url, body=request.body, headers=request.headers, redirect=False, assert_same_host=False, preload_content=False, decode_content=False, retries=self.max_retries, timeout=timeout ) # Send the request. else: if hasattr(conn, 'proxy_pool'): conn = conn.proxy_pool low_conn = conn._get_conn(timeout=DEFAULT_POOL_TIMEOUT) try: low_conn.putrequest(request.method, url, skip_accept_encoding=True) for header, value in request.headers.items(): low_conn.putheader(header, value) low_conn.endheaders() for i in request.body: low_conn.send(hex(len(i))[2:].encode('utf-8')) low_conn.send(b'\r\n') low_conn.send(i) low_conn.send(b'\r\n') low_conn.send(b'0\r\n\r\n') # Receive the response from the server try: # For Python 2.7, use buffering of HTTP responses r = low_conn.getresponse(buffering=True) except TypeError: # For compatibility with Python 3.3+ r = low_conn.getresponse() resp = HTTPResponse.from_httplib( r, pool=conn, connection=low_conn, preload_content=False, decode_content=False ) except: # If we hit any problems here, clean up the connection. # Then, reraise so that we can handle the actual exception. low_conn.close() raise except (ProtocolError, socket.error) as err: raise ConnectionError(err, request=request) except MaxRetryError as e: if isinstance(e.reason, ConnectTimeoutError): # TODO: Remove this in 3.0.0: see #2811 if not isinstance(e.reason, NewConnectionError): raise ConnectTimeout(e, request=request) if isinstance(e.reason, ResponseError): raise RetryError(e, request=request) if isinstance(e.reason, _ProxyError): raise ProxyError(e, request=request) if isinstance(e.reason, _SSLError): # This branch is for urllib3 v1.22 and later. raise SSLError(e, request=request) > raise ConnectionError(e, request=request) E requests.exceptions.ConnectionError: HTTPSConnectionPool(host='workshop.simplilearn.com', port=443): Max retries exceeded with url: /api/v2/workshops/list-by-filter (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000023165477790>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond')) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\requests\adapters.py:516: ConnectionError | |||
Failed | test_assessment.py::TestAssessment::test_project_upload_size_file_greater_than_permissible_size | 0.13 | |
self = <test_assessment.TestAssessment object at 0x000002316510AB20>, initialize_pages = None testdata = {'assessment_url': '/courses/3128/Big-Data-Hadoop-Administrator-Course-Live/assessment', 'email': 'BQnewtest1@yopmail.com', 'errmsg_size>10MB': 'Please upload files less than 10MB', 'file_path': '/config.json', ...} @pytest.mark.test_details("1","high","Assessment","Pavan") def test_project_upload_size_file_greater_than_permissible_size(self,initialize_pages,testdata): ''' Objective : User should not be able to upload_size_file_greater_than_permissible_size step1: Navigate to lms and login with valid credentials step2: Navigate to assessment tab step3: Click on first project then on submit button and then click on submit project button step4: Step4: Upload file size greater than 10MB and verify err msg Step5: Click on close btn and back btn ''' #step1: Navigate to lms and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_assessment.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_assessment.py::TestAssessment::test_project_upload_size_file_lesser_than_or_equal_to_permissible_size | 1.82 | |
self = <test_assessment.TestAssessment object at 0x0000023164C3F430>, initialize_pages = None testdata = {'assessment_url': '/courses/3128/Big-Data-Hadoop-Administrator-Course-Live/assessment', 'email': 'BQnewtest1@yopmail.com', 'file_path': '/config.json', 'home_url': '/dashboard', ...} @pytest.mark.test_details("1","high","Assessment","Pavan") def test_project_upload_size_file_lesser_than_or_equal_to_permissible_size(self,initialize_pages,testdata): ''' Objective : User should be able to upload_size_file_lesser_than_permissible_size step1: Navigate to lms and login with valid credentials step2: Navigate to assessment tab step3: Click on first project then on submit button and then click on submit project button step4: Step4: Upload file size lesser than 10 MB Step5: Click on close btn and back btn ''' #step1: Navigate to lms and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_assessment.py:121: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_assessment.py::TestAssessment::test_project_successfull_upload | 0.22 | |
self = <test_assessment.TestAssessment object at 0x0000023163D16370>, initialize_pages = None testdata = {'assessment_url': '/courses/3128/Big-Data-Hadoop-Administrator-Course-Live/assessment', 'email': 'BQnewtest1@yopmail.com', 'file_path': '/config.json', 'home_url': '/dashboard', ...} @pytest.mark.test_details("1","high","Assessment","Pavan") def test_project_successfull_upload(self,initialize_pages,testdata): ''' Objective : User should be able to upload_successfully step1: Navigate to lms and login with valid credentials step2: Navigate to assessment tab step3: Click on first project then on submit button and then click on submit project button step4: Step4: Upload file size lesser than 10 MB Step5: Click on close btn and back btn ''' #step1: Navigate to lms and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_assessment.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_assessment.py::TestAssessment::test_project_unsuccessfull_upload | 1.84 | |
self = <test_assessment.TestAssessment object at 0x0000023163D1D340>, initialize_pages = None testdata = {'assessment_url': '/courses/3128/Big-Data-Hadoop-Administrator-Course-Live/assessment', 'email': 'BQnewtest1@yopmail.com', 'err_msg_unsupported_files': 'files are not supported', 'file_path': '/test/pytest.ini', ...} @pytest.mark.test_details("1","high","Assessment","Pavan") def test_project_unsuccessfull_upload(self,initialize_pages,testdata): ''' Objective : User should be able to upload_unsuccessfully step1: Navigate to lms and login with valid credentials step2: Navigate to assessment tab step3: Click on first project then on submit button and then click on submit project button step4: Step4: Upload file which is not supported Step5: Click on close btn and back btn ''' #step1: Navigate to lms and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_assessment.py:203: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_assessment.py::TestAssessment::test_assessment_finish_yes | 0.21 | |
self = <test_assessment.TestAssessment object at 0x000002316531D340>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'expired_assessment_message': 'Assessment Access Expired', 'home_url': '/dashboard', 'message': 'Test Completed', ...} @pytest.mark.test_details("SLUB-T1432","high","Assessment","Himanshu") def test_assessment_finish_yes(self,initialize_pages,testdata): ''' Objective : To verify the if the test is finished #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses #STEP 4: go to the course #STEP 5: check wheather the assessment is present #STEP 6: go to assessment #STEP 7: launch test #STEP 8: end the test #STEP 9: check the test is successfully submit ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_assessment.py:254: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_assessment.py::TestAssessment::test_assessment_finish_cancel | 1.84 | |
self = <test_assessment.TestAssessment object at 0x0000023164F14640>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'expired_assessment_message': 'Assessment Access Expired', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Assessment","Himanshu") def test_assessment_finish_cancel(self,initialize_pages,testdata): ''' Objective : To verify the if the cancel functionality on finish test #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses #STEP 4: go to the course #STEP 5: check wheather the assessment is present #STEP 6: go to assessment #STEP 7: launch test #STEP 8: cancel the test #STEP 9: check the test is successfully submit #STEP 10: end the test ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_assessment.py:322: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_admin_programpage_visibility | 0.26 | |
self = <test_certificate.TestCertificate object at 0x0000023163D1DDC0>, initialize_pages = None testdata = {'admin_url': '/admin', 'bundle_id': '242 Quality Management', 'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T7745","high","Program Certificate","Prince") def test_admin_programpage_visibility(self,initialize_pages,testdata): ''' Objective : check on the functionality of program list tab . Step1: Navigate to Login page.. Step2: Verify redirected to lms admin Page Step3: Click Program Management then Program List tab Step4: Search for specific Program id and match the corresponding bundle ID ''' # Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_certificate.py:75: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_admin_PGPtoCertificate_CertNotConfigured | 1.63 | |
self = <test_certificate.TestCertificate object at 0x000002316556BF70>, initialize_pages = None testdata = {'admin_url': '/admin', 'db_type': 'mysql', 'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T7746","high","Program Certificate","Prince") def test_admin_PGPtoCertificate_CertNotConfigured(self,initialize_pages,testdata): ''' Objective : check on the functionality of program list tab . Step1: Navigate to Login page.. Step2: Verify redirected to lms admin Page Step3: Click Program Management then Program List tab Step4: Click Not Configure PG Program and go to respective certification Tab Step5: Turn On learning path and configure certificate identifier and save it Step6: Turn off learning path before logout, so same identifier can be used for other test case ''' # Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_certificate.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_admin_PGPtoCertificate_CertConfigured | 0.40 | |
self = <test_certificate.TestCertificate object at 0x0000023164434310>, initialize_pages = None testdata = {'admin_url': '/admin', 'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T7747","high","Program Certificate","Prince") def test_admin_PGPtoCertificate_CertConfigured(self,initialize_pages,testdata): ''' Objective : check on the functionality of program list tab . Step1: Navigate to Login page.. Step2: Verify redirected to lms admin Page Step3: Click Program Management then Program List tab Step4: Click Configured PGP Program and go to respective certification Tab Step5: Check if all the data is prefilled and uneditable Step6: Logout the user ''' # Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_certificate.py:230: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_admin_MPtoCertificate_CertNotConfigured | 1.29 | |
self = <test_certificate.TestCertificate object at 0x000002316452C7F0>, initialize_pages = None testdata = {'admin_url': '/admin', 'db_type': 'mysql', 'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T7748","high","Program Certificate","Prince") def test_admin_MPtoCertificate_CertNotConfigured(self,initialize_pages,testdata): ''' Objective : check on the functionality of program list tab . Step1: Navigate to Login page.. Step2: Verify redirected to lms admin Page Step3: Click Program Management then Program List tab Step4: Click Not Configure MP Program and go to respective certification Tab Step5: Turn On learning path and configure certificate identifier and save it Step6: Turn off learning path before logout, so same identifier can be used for other test case ''' # Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_certificate.py:284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_admin_UI_verify | 60.57 | |
self = <test_certificate.TestCertificate object at 0x00000231642B7370>, initialize_pages = None testdata = {'b2b_certicateprogram': 'Program level certificates', 'b2b_certificationprogram': 'Certification Programs', 'b2b_learningpath': 'Learning paths', 'b2b_masterprogram': "Master's Programs", ...} @pytest.mark.test_details("SLUB-T7750","high","Program Certificate","Prince") def test_admin_UI_verify(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Click on courses & path and check if all tabs are available or not Step7: Click Customization -> Preferences option, Program certificate is available or not ''' # Navigate to Login page. lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load #selenium_helper.wait_for_page_to_load(10,testdata['xenia_url']) time.sleep(5) logging.info("logged in to xenia successfull..!!") self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() # wait for finsale url to load selenium_helper.wait_for_page_to_load(10,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(40,testdata['b2b_url']) self.pg_certificate.btn_b2b_coursesAndPath.click_button() logging.info("In B2b page and clicked coure and path successfully") assert(testdata['b2b_certificationprogram'] in self.pg_certificate.label_b2b_certificationProgram.text) assert(testdata['b2b_masterprogram'] in self.pg_certificate.label_b2b_masterProgram.text) > assert(testdata['b2b_pgprogram'] in self.pg_certificate.label_b2b_pgProgram.text) test\test_certificate.py:465: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.certificate_page.CertificatePage object at 0x0000023164AEC940>, loc = 'label_b2b_pgProgram' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: label_b2b_pgProgram core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:441 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:448 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:456 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:461 In B2b page and clicked coure and path successfully [33mWARNING [0m setup:page_factory.py:57 the locator label_b2b_pgProgram on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate# is not present | |||
Failed | test_certificate.py::TestCertificate::test_admin_verify_coursePath | 63.53 | |
self = <test_certificate.TestCertificate object at 0x00000231642CF7C0>, initialize_pages = None testdata = {'b2b_MP': 'Master Program', 'b2b_certification': 'Course', 'b2b_certificationprogram': 'Certification Programs', 'b2b_learningPath': '', ...} @pytest.mark.test_details("SLUB-T7751","high","Program Certificate","Prince") def test_admin_verify_coursePath(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI - Course & Paths Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Click on courses & path and check if all tabs are available or not Step7: Click Certification, Masters, PGP and Learning Path Step8: Verify if the tab has correct values or not ''' # Navigate to Login page. lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load #selenium_helper.wait_for_page_to_load(10,testdata['xenia_url']) time.sleep(5) logging.info("logged in to xenia successfull..!!") time.sleep(5) self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() # wait for finsale url to load selenium_helper.wait_for_page_to_load(10,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(40,testdata['b2b_url']) self.pg_certificate.btn_b2b_coursesAndPath.click_button() logging.info("In B2b page and clicked coure and path successfully") assert(testdata['b2b_certificationprogram'] in self.pg_certificate.label_b2b_certificationProgram.text) assert(testdata['b2b_masterprogram'] in self.pg_certificate.label_b2b_masterProgram.text) > assert(testdata['b2b_pgprogram'] in self.pg_certificate.label_b2b_pgProgram.text) test\test_certificate.py:522: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.certificate_page.CertificatePage object at 0x00000231651D5D00>, loc = 'label_b2b_pgProgram' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: label_b2b_pgProgram core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:498 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:505 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:513 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:518 In B2b page and clicked coure and path successfully [33mWARNING [0m setup:page_factory.py:57 the locator label_b2b_pgProgram on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate# is not present | |||
Failed | test_certificate.py::TestCertificate::test_admin_verify_MPCertification | 63.67 | |
self = <test_certificate.TestCertificate object at 0x00000231651D5C10>, initialize_pages = None testdata = {'b2b_MP': 'Master Program', 'b2b_certificationprogram': 'Certification Programs', 'b2b_learningpath': 'Learning paths', 'b2b_masterprogram': "Master's Programs", ...} @pytest.mark.test_details("SLUB-T7752","high","Program Certificate","Prince") def test_admin_verify_MPCertification(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI - Mp SimplilearnDefault configured Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Click on courses & path and check if all tabs are available or not Step7: Click Master's Progam Tab and search for particular id Step8: Choose simplilearn as certificate Srep9: Verify the data ''' # Navigate to Login page. pytest.driver.delete_all_cookies() lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load selenium_helper.wait_for_page_to_load(10,testdata['xenia_url']) logging.info("logged in to xenia successfull..!!") self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() # wait for finsale url to load selenium_helper.wait_for_page_to_load(10,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(40,testdata['b2b_url']) self.pg_certificate.btn_b2b_coursesAndPath.click_button() logging.info("In B2b page and clicked coure and path successfully") assert(testdata['b2b_certificationprogram'] in self.pg_certificate.label_b2b_certificationProgram.text) assert(testdata['b2b_masterprogram'] in self.pg_certificate.label_b2b_masterProgram.text) > assert(testdata['b2b_pgprogram'] in self.pg_certificate.label_b2b_pgProgram.text) test\test_certificate.py:605: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.certificate_page.CertificatePage object at 0x0000023164EFCAC0>, loc = 'label_b2b_pgProgram' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: label_b2b_pgProgram core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:581 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:588 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:596 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:601 In B2b page and clicked coure and path successfully [33mWARNING [0m setup:page_factory.py:57 the locator label_b2b_pgProgram on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate# is not present | |||
Failed | test_certificate.py::TestCertificate::test_admin_verify_PGPCertification | 64.58 | |
self = <test_certificate.TestCertificate object at 0x0000023164EFCBB0>, initialize_pages = None testdata = {'b2b_certificationprogram': 'Certification Programs', 'b2b_learningpath': 'Learning paths', 'b2b_masterprogram': "Master's Programs", 'b2b_pgp': 'PG Program', ...} @pytest.mark.test_details("SLUB-T7753","high","Program Certificate","Prince") def test_admin_verify_PGPCertification(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI - PGP SimplilearnDefault configured Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Click on courses & path and check if all tabs are available or not Step7: Click PGP Program Tab and search for particular id Step8: Choose simplilearn as certificate Srep9: Verify the data ''' # Navigate to Login page. lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load selenium_helper.wait_for_page_to_load(10,testdata['xenia_url']) logging.info("logged in to xenia successfull..!!") self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() # wait for finsale url to load selenium_helper.wait_for_page_to_load(10,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(40,testdata['b2b_url']) self.pg_certificate.btn_b2b_coursesAndPath.click_button() logging.info("In B2b page and clicked coure and path successfully") assert(testdata['b2b_certificationprogram'] in self.pg_certificate.label_b2b_certificationProgram.text) assert(testdata['b2b_masterprogram'] in self.pg_certificate.label_b2b_masterProgram.text) > assert(testdata['b2b_pgprogram'] in self.pg_certificate.label_b2b_pgProgram.text) test\test_certificate.py:712: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.certificate_page.CertificatePage object at 0x000002316516DD60>, loc = 'label_b2b_pgProgram' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: label_b2b_pgProgram core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:688 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:695 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:703 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:708 In B2b page and clicked coure and path successfully [33mWARNING [0m setup:page_factory.py:57 the locator label_b2b_pgProgram on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate# is not present | |||
Failed | test_certificate.py::TestCertificate::test_admin_verify_MPCustomCertification | 63.61 | |
self = <test_certificate.TestCertificate object at 0x000002316516DA90>, initialize_pages = None testdata = {'b2b_MP': 'Master Program', 'b2b_certificationprogram': 'Certification Programs', 'b2b_learningpath': 'Learning paths', 'b2b_masterprogram': "Master's Programs", ...} @pytest.mark.test_details("SLUB-T7754","high","Program Certificate","Prince") def test_admin_verify_MPCustomCertification(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI - Mp CustomCert configured Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Click on courses & path and check if all tabs are available or not Step7: Click Master's Progam Tab and search for particular id Step8: Choose custom button for certificate Step9: Fill out the relevant details and save the same Step10: Verify the data and turn off the certification for further use ''' # Navigate to Login page. lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load selenium_helper.wait_for_page_to_load(10,testdata['xenia_url']) logging.info("logged in to xenia successfull..!!") self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() # wait for finsale url to load selenium_helper.wait_for_page_to_load(20,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(40,testdata['b2b_url']) self.pg_certificate.btn_b2b_coursesAndPath.click_button() logging.info("In B2b page and clicked coure and path successfully") assert(testdata['b2b_certificationprogram'] in self.pg_certificate.label_b2b_certificationProgram.text) assert(testdata['b2b_masterprogram'] in self.pg_certificate.label_b2b_masterProgram.text) > assert(testdata['b2b_pgprogram'] in self.pg_certificate.label_b2b_pgProgram.text) test\test_certificate.py:792: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.certificate_page.CertificatePage object at 0x000002316403BB50>, loc = 'label_b2b_pgProgram' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: label_b2b_pgProgram core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:768 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:775 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:783 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:788 In B2b page and clicked coure and path successfully [33mWARNING [0m setup:page_factory.py:57 the locator label_b2b_pgProgram on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate# is not present | |||
Failed | test_certificate.py::TestCertificate::test_admin_verify_CLPCertification | 63.51 | |
self = <test_certificate.TestCertificate object at 0x000002316403BE80>, initialize_pages = None testdata = {'b2b_certificationprogram': 'Certification Programs', 'b2b_learningpath': 'Learning paths', 'b2b_masterprogram': "Master's Programs", 'b2b_pgprogram': 'PG Programs', ...} @pytest.mark.test_details("SLUB-T7755","high","Program Certificate","Prince") def test_admin_verify_CLPCertification(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI - CLP CustomCert configured Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Click on courses & path and check if all tabs are available or not Step7: Click Learning Path Tab and search for particular id Step8: Choose custom button for certificate Step9: Fill out the relevant details and save the same Step10: Verify the data and turn off the certification for further use ''' # Navigate to Login page. lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load selenium_helper.wait_for_page_to_load(10,testdata['xenia_url']) logging.info("logged in to xenia successfull..!!") self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() # wait for finsale url to load selenium_helper.wait_for_page_to_load(10,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(40,testdata['b2b_url']) self.pg_certificate.btn_b2b_coursesAndPath.click_button() logging.info("In B2b page and clicked coure and path successfully") assert(testdata['b2b_certificationprogram'] in self.pg_certificate.label_b2b_certificationProgram.text) assert(testdata['b2b_masterprogram'] in self.pg_certificate.label_b2b_masterProgram.text) > assert(testdata['b2b_pgprogram'] in self.pg_certificate.label_b2b_pgProgram.text) test\test_certificate.py:912: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.certificate_page.CertificatePage object at 0x000002316419F910>, loc = 'label_b2b_pgProgram' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: label_b2b_pgProgram core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:888 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:895 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:903 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:908 In B2b page and clicked coure and path successfully [33mWARNING [0m setup:page_factory.py:57 the locator label_b2b_pgProgram on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate# is not present | |||
Failed | test_certificate.py::TestCertificate::test_CertMod_B2C_ConfiguredMP_BackenedAssignment | 2.36 | |
self = <test_certificate.TestCertificate object at 0x0000023163BD4EB0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'db_type': 'mysql', 'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T7758","high","Program Certificate","Prince") def test_CertMod_B2C_ConfiguredMP_BackenedAssignment(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI - ProgramCertificate Enable Step1: Register a new User Step2: Login to LMS as admin Step3: Verify redirected to support URL Step4: select the program which was configured with certificate in the precondition Step5: Fill all related information and save successfully with the new user Step6: Login to LMS with new user registered in precondition Step7: Fill the onboarding oob page for learner with all information Step8: Check if Master program Tab is present ot not Step9: Check if the program name is there or not Step10: Check if certification tab is present or not Step11: Verify the same with DB command as well for certification ''' # Register new user pytest.driver.delete_all_cookies() > email_id = TestCertificate.create_newUser(self,testdata) test\test_certificate.py:1123: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_certificate.py:36: in create_newUser pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_CertMod_B2C_ConfiguredPGP_BackenedAssignment | 2.21 | |
self = <test_certificate.TestCertificate object at 0x00000231636CFD90>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'db_type': 'mysql', 'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T10411","high","Program Certificate","Prince") def test_CertMod_B2C_ConfiguredPGP_BackenedAssignment(self,initialize_pages,testdata): ''' Objective : check on the functionality of Admin UI - ProgramCertificate Enable Step1: Register a new User Step2: Login to LMS as admin Step3: Verify redirected to support URL Step4: select the program which was configured with certificate in the precondition Step5: Fill all related information and save successfully with the new user Step6: Login to LMS with new user registered in precondition Step7: Fill the onboarding oob page for learner with all information Step8: Check if PG program Tab is present ot not Step9: Check if the program name is there or not Step10: Check if certification tab is present or not Step11: Verify the same with DB command as well for certification ''' # Register new user pytest.driver.delete_all_cookies() > email_id = TestCertificate.create_newUser(self,testdata) test\test_certificate.py:1240: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_certificate.py:36: in create_newUser pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_CertMod_B2B_MPCertConfigured_ProgramAssignment | 124.24 | |
self = <test_certificate.TestCertificate object at 0x00000231630387C0>, initialize_pages = None testdata = {'Big_Data_Hadoop_and_Spark_Developer': 'Big Data Hadoop and Spark Developer', 'Data_Science_Capstone': 'Data Science ...cience_with_Python': 'Data Science with Python', 'Deep_Learning_with_TensorFlow': 'Deep Learning with TensorFlow', ...} @pytest.mark.test_details("SLUB-T10413","high","Program Certificate","Pradeep") def test_CertMod_B2B_MPCertConfigured_ProgramAssignment(self,initialize_pages,testdata): ''' Objective: check on the functionality of Admin UI - ProgramCertificate Enable Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Navigate to Learners Page Step7: Verify Learners Page Step8: Add learner Manually Step9: Verify Add Learner Manually Step10: Enter Credintials and add Learner step11: loginto mail box and click on verification link step12: copy activation link and open step13: enter details to register in form and click signup step14: click on skip button on oob form step15: check master tab and courses assigned step16: Verify All Present tab ''' #Step1: Navigate to xenia Login page.. lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load selenium_helper.wait_for_page_to_load(10,testdata['xenia_home_url']) #time.sleep(5) logging.info("logged in to xenia successfull..!!") #Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises selenium_helper.is_element_present(self.pg_certificate.locators['btn_fin_sale'][0],60) self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() # wait for finsale url to load selenium_helper.wait_for_page_to_load(10,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") #Step:4 Click Particular GID is present and then login as manager for same self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() time.sleep(5) assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") #Step5: Verify redirected to b2b Page as manager # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(120,testdata['b2b_url']) #Step6: Navigate to Learners Page self.pg_certificate.button_People.click_button() self.pg_certificate.button_learner.click_button() #Step 7: Verify Learners Page #time.sleep(10) selenium_helper.wait_for_page_to_load(120,testdata['learners_url']) assert (testdata['b2b_learners_page'] == self.pg_certificate.learner_page.text) logging.info("Learner page opened sucessfully") time.sleep(10) #Step8: Add learner Manually selenium_helper.is_element_present(self.pg_certificate.locators['add_learner_button'][0],30) self.pg_certificate.add_learner_button.click_button() #selenium_helper.wait_for_page_to_load(40,testdata['add_learner_url']) self.pg_certificate.manually_button.click_button() #Step9: Verify Add Learner Manually #time.sleep(10) selenium_helper.wait_for_page_to_load(60,testdata['add_url']) assert (testdata['b2b_add_learner_manually']==self.pg_certificate.add_learner_manually_page.text) selenium_helper.is_element_present(self.pg_certificate.locators["enter_name_box"][0],50) logging.info("Add_Learner_Manually page opened sucessfully") #Step10: Enter Credintials and all Learner ''' first generate random name and email, then enter those data''' name=utils.generate_random_name() email = utils.generate_random_email_with_simplilearn() print(email) self.pg_certificate.enter_name_box.send_keys(name) self.pg_certificate.enter_email_box.send_keys(email) logging.info("Name and Email entered sucessfully") self.pg_certificate.enter_course_type.click_button() self.pg_certificate.select_master_program.click_button() logging.info("master program selected") self.pg_certificate.select_course.click_button() self.pg_certificate.select_data_scintist_67.click_button() logging.info("data_scientist_67 SELECTED") #selenium_helper.wait_for_page_to_load(40,testdata[""]) time.sleep(10) self.pg_certificate.button_add_learner.click_button() logging.info("Clicked ON ADD LEARNER BUTTON") #logout as manager time.sleep(20) if selenium_helper.is_element_present(self.pg_certificate.locators['message_learner_added'][0],60) == True: > assert (self.pg_certificate.message_learner_added.text == testdata['learner_added_message']) E AssertionError: assert '' == 'Learners added successfully' E - Learners added successfully test\test_certificate.py:1445: AssertionError -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:1372 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:1381 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:1391 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:1405 Learner page opened sucessfully [32mINFO [0m setup:test_certificate.py:1419 Add_Learner_Manually page opened sucessfully [32mINFO [0m setup:test_certificate.py:1430 Name and Email entered sucessfully [32mINFO [0m setup:test_certificate.py:1433 master program selected [32mINFO [0m setup:test_certificate.py:1436 data_scientist_67 SELECTED [32mINFO [0m setup:test_certificate.py:1440 Clicked ON ADD LEARNER BUTTON [33mWARNING [0m setup:page_factory.py:66 the locator message_learner_added on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate/learner/add is not visible | |||
Failed | test_certificate.py::TestCertificate::test_CertMod_B2B_PGPCertConfigured_ProgramAssignment | 133.14 | |
self = <test_certificate.TestCertificate object at 0x0000023163056C70>, initialize_pages = None testdata = {'Big_Data_Hadoop_and_Spark_Developer': 'Big Data Hadoop and Spark Developer', 'Introduction_to_Artificial_Intelligenc...PG Program Certificate', 'Post_Graduate_Program_in_Data_Science_156': 'Post Graduate Program in Data Science-156', ...} @pytest.mark.test_details("SLUB-T10416","high","Program Certificate","Pradeep") def test_CertMod_B2B_PGPCertConfigured_ProgramAssignment(self,initialize_pages,testdata): ''' Objective: check on the functionality of Admin UI - ProgramCertificate Enable Step1: Navigate to xenia Login page.. Step2: Verify redirected to Xenia Page Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises Step4: Click Particular GID is present and then login as manager for same Step5: Verify redirected to b2b Page as manager Step6: Navigate to Learners Page Step7: Verify Learners Page Step8: Add learner Manually Step9: Verify Add Learner Manually Step10: Enter Credintials and add Learner step11: loginto mail box and click on verification link step12: copy activation link and open in a new tab step13: enter details to register in form and click signup step14: click on skip button on oob form #step 15: check PG Progran tab and courses assigned ''' #Step1: Navigate to xenia Login page.. pytest.driver.delete_all_cookies() lms_login_helper.xenia_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(60,testdata['xenia_home_url']) logging.info("logged in to xenia successfull..!!") #Step3: Click FIN Sale-> Enterprise Plans-> View All Enterprises selenium_helper.is_element_present(self.pg_certificate.locators['btn_fin_sale'][0],60) self.pg_certificate.btn_fin_sale.click_button() self.pg_certificate.btn_enterprise_plans.click_button() self.pg_certificate.btn_view_experiences.click_button() selenium_helper.wait_for_page_to_load(10,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") #Step:4 Click Particular GID is present and then login as manager for same self.pg_certificate.label_id.send_keys(2009) time.sleep(1) self.pg_certificate.btn_id_search.click_button() time.sleep(5) assert (testdata['enterprise_id'] == self.pg_certificate.label_id_field.text) self.pg_certificate.btn_ellipsis.click_button() self.pg_certificate.btn_manager_login.click_button() logging.info("Clicked on manage login to redirect to b2b") #Step5: Verify redirected to b2b Page as manager # wait for b2b dash board to load selenium_helper.wait_for_page_to_load(120,testdata['b2b_url']) #Step6: Navigate to Learners Page self.pg_certificate.button_People.click_button() self.pg_certificate.button_learner.click_button() #Step 7: Verify Learners Page selenium_helper.wait_for_page_to_load(120,testdata['learners_url']) assert (testdata['b2b_learners_page'] == self.pg_certificate.learner_page.text) logging.info("Learner page opened sucessfully") time.sleep(10) #Step8: Add learner Manually selenium_helper.is_element_present(self.pg_certificate.locators['add_learner_button'][0],30) self.pg_certificate.add_learner_button.click_button() self.pg_certificate.manually_button.click_button() #Step9: Verify Add Learner Manually selenium_helper.wait_for_page_to_load(60,testdata['add_url']) assert (testdata['b2b_add_learner_manually']==self.pg_certificate.add_learner_manually_page.text) selenium_helper.is_element_present(self.pg_certificate.locators["enter_name_box"][0],50) logging.info("Add_Learner_Manually page opened sucessfully") #Step10: Enter Credintials and add Learner ''' first generate random name and email, then enter those data ''' name=utils.generate_random_name() email = utils.generate_random_email_with_simplilearn() print(email) self.pg_certificate.enter_name_box.send_keys(name) self.pg_certificate.enter_email_box.send_keys(email) logging.info("Name and Email entered sucessfully") self.pg_certificate.enter_course_type.click_button() self.pg_certificate.select_master_program.click_button() logging.info("master program selected") self.pg_certificate.select_course.click_button() self.pg_certificate.select_Post_Graduate_Program_in_Data_Science_156.click_button() time.sleep(20) self.pg_certificate.button_add_learner.click_button() logging.info("Clicked ON ADD LEARNER BUTTON") #logout as manager time.sleep(20) if selenium_helper.is_element_present(self.pg_certificate.locators['message_learner_added'][0],60) == True: > assert (self.pg_certificate.message_learner_added.text == testdata['learner_added_message']) E AssertionError: assert '' == 'Learners added successfully' E - Learners added successfully test\test_certificate.py:1629: AssertionError -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:1562 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:1570 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:1580 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:1593 Learner page opened sucessfully [32mINFO [0m setup:test_certificate.py:1605 Add_Learner_Manually page opened sucessfully [32mINFO [0m setup:test_certificate.py:1616 Name and Email entered sucessfully [32mINFO [0m setup:test_certificate.py:1619 master program selected [32mINFO [0m setup:test_certificate.py:1624 Clicked ON ADD LEARNER BUTTON [33mWARNING [0m setup:page_factory.py:66 the locator message_learner_added on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate/learner/add is not visible | |||
Failed | test_certificate.py::TestCertificate::test_CertMod_B2C_ConfiguredMP_CertificationTab_LockedCourses_and_Program_UIVerification | 2.30 | |
self = <test_certificate.TestCertificate object at 0x0000023162C499D0>, initialize_pages = None testdata = {'Adobe_Soundbooth_CS5': 'Adobe Soundbooth CS5', 'Big_Data_Hadoop_and_Spark_Developer': 'Big Data Hadoop and Spark Developer', 'Core_Java': 'Core Java', 'Data_Science_Capstone': 'Data Science Capstone', ...} @pytest.mark.test_details("SLUB-T10418","high","Program Certificate","Pradeep") def test_CertMod_B2C_ConfiguredMP_CertificationTab_LockedCourses_and_Program_UIVerification(self,initialize_pages,testdata): ''' Objective: check on the functionality of Admin UI - ProgramCertificate Enable Step1: loign as a learner.. Step2: verify master program tab Step3: Verify program which was assigned Step4: Click on Start program CTA Step5: Verify the certification tab Step6: Capture the courses present under Courses tab Step7: Capture the Courses present in electives tab Step8: Navigate to Certification tab Step9: Verify the courses list under Program certificate to be same as that from courses tab Step10: erify the courses list under Electives to be same as Electives tab step11: verify the course certificate template overlay step12: verify the program level certificate template step13: verify the locked screen step14: verify the pending courses count ''' #Step1: Login as alearner.. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_certificate.py:1912: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_certificate.py::TestCertificate::test_CertMod_B2C_ConfiguredPGP_CertificationTab_LockedCourses_and_Program_UIVerification | 2.19 | |
self = <test_certificate.TestCertificate object at 0x0000023164CD1DF0>, initialize_pages = None testdata = {'certification_url': '/certification', 'course_certificate_template': 'Locked', 'dashboard_url': '/dashboard', 'email': 'Test4726@yopmail.com', ...} @pytest.mark.test_details("SLUB-T10419","high","Program Certificate","Pradeep") def test_CertMod_B2C_ConfiguredPGP_CertificationTab_LockedCourses_and_Program_UIVerification(self,initialize_pages,testdata): ''' STEP 01: Login as the learner STEP 02: verify the PG program tab STEP 03: verify the program which was assigned STEP 04: Click on Start program CTA STEP 05: Verify the certification tab STEP 06: Capture the courses present under Courses tab STEP 07: Capture the course present under Prerequitie tab STEP 08: Capture the Courses present in electives tab STEP 09: Navigate to Certification tab STEP 10: Verify the courses list under Program certificate to be same as that from courses tab STEP 11: Verify the courses list under prerequite tab to be sames as Electives tab STEP 12: VSTEP 13: verify the course certificate template overlayerify the courses list under Electives to be sames as Electives tab STEP 13: verify the course certificate template overlay STEP 14: verify the program level certificate template STEP 15: verify the locked screen STEP 16: verify the pending courses count ''' #STEP 01: Login as the learner > lms_login_helper.login(testdata['email'],testdata['password']) test\test_certificate.py:2061: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_changepassword.py::TestChangePassword::test_login_with_new_password | 0.17 | |
self = <test_changepassword.TestChangePassword object at 0x0000023164BCABB0>, initialize_pages = None testdata = {'gmail': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'new_password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Change Password","Himanshu") def test_login_with_new_password(self,initialize_pages,testdata): #Step8: Login with new password to check new password is set. > lms_login_helper.login(testdata['gmail'],testdata['new_password']) test\test_changepassword.py:111: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCCohortClass_ClassCreation_MultipleSession | 0.97 | |
self = <test_cohort.TestCohort object at 0x000002316575F9A0>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6369","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCCohortClass_ClassCreation_MultipleSession(self,initialize_pages,testdata): ''' Objective : This test is to verify that the GLVC cohort class is created successfully and displayed correctly to the cohort user. #STEP 1: call the engagex test case #STEP 2; read the data from engagex #STEP 3: Navigate to Login page. #STEP 4: go to live classes #STEP 5: check the given course is available #STEP 6: logout from user ''' #STEP 1: call the engagex test case CallEngagex().create_glvc_cohort_with_multiple_session() #STEP 2; read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x000002316574B790> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_CohortClassfromDifferentCohort_ClassNotDisplayed | 0.46 | |
self = <test_cohort.TestCohort object at 0x000002316544E310>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3921', 'email': 'iris_apollo843@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6370","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_CohortClassfromDifferentCohort_ClassNotDisplayed(self,initialize_pages,testdata): ''' Objective : This test is to verify that use having same program but different cohort,should not be able to see the classes to register belong wo another cohort #STEP 1:login and wait for all element to load #STEP 2; read the data from engagex #STEP 3: go to live classes #STEP 4: check all the validation that course is expired and user not able to register for class #STEP 5: logout from user ''' # STEP 1:login and wait for all element to load > lms_login_helper.login(testdata['email'],testdata['password']) test\test_cohort.py:95: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_ValidCourse_ClassDisplayed | 0.00 | |
self = <test_cohort.TestCohort object at 0x000002316579AB50>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6371","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_ValidCourse_ClassDisplayed(self,initialize_pages,testdata): ''' Objective : This test is to verify that the cohort GLVC class should be available to user , so that user can select the class to register. #STEP 1: read the data from engagex #STEP 2: Navigate to Login page. #STEP 3: go to live classes #STEP 4: check the given course is available #STEP 5: logout from user ''' #STEP 1; read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x000002316579ABB0> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_lvc_integrationtest_glvccohortclass_register_passed | 0.84 | |
self = <test_cohort.TestCohort object at 0x0000023165794CD0>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6372","high","Cohort","Himanshu") def test_lvc_integrationtest_glvccohortclass_register_passed(self,initialize_pages,testdata): ''' Objective : This test is to verify that the cohort GLVC class should be available to the user and the user is able to register for the class successfully #STEP 1: call the engagex test case #STEP 2: read the data from engagex #STEP 3:login and wait for all element to load #STEP 4: go to live classes #STEP 5: return the index of class #STEP 6: click on registration button #STEP 7: switch to alert and complete the registration #STEP 8: logout from user #STEP 9: call the engagex test case #STEP 10: read the data from engagex #STEP 11: check the registration count has been increase ''' #STEP 1: call the engagex test case CallEngagex().get_the_registration_count_for_glvc_cohort() #STEP 2: read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:164: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x000002316565B910> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_Attend_Passed | 0.50 | |
self = <test_cohort.TestCohort object at 0x0000023165794E50>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6374","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_Attend_Passed(self,initialize_pages,testdata): ''' Objective : This test is to verify that the user should be able to attend the GLVC class successfully #STEP 1:login and wait for all element to load #STEP 2: go to live classes #STEP 3: check go to button is present #STEP 4: logout from user ''' # STEP 1:login and wait for all element to load > lms_login_helper.login(testdata['email'],testdata['password']) test\test_cohort.py:222: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_MyClassesTab_AddToCalenderCTA | 1.51 | |
self = <test_cohort.TestCohort object at 0x000002316558E100>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6380","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_MyClassesTab_AddToCalenderCTA (self,initialize_pages,testdata): ''' Objective : This test is to verify that 'Add to Calendar' CTA should be shown under My Classes tab when the user registers for the class. #STEP 1:login and wait for all element to load #STEP 2: go to live classes #STEP 3: check calender button is present #STEP 4: logout from user ''' # STEP 1:login and wait for all element to load > lms_login_helper.login(testdata['email'],testdata['password']) test\test_cohort.py:255: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_SoldOutTrigger | 0.00 | |
self = <test_cohort.TestCohort object at 0x000002316539AB20>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_apollo843@yopmail.com', 'email2': 'ccr50@yopmail.com', ...} @pytest.mark.test_details("SLUB-T6375","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_SoldOutTrigger(self,initialize_pages,testdata): ''' Objective : This test is to verify that when the class registration count reaches the max head count, then the class should be marked as sold out #STEP 1: read the data from engagex #STEP 2:login and wait for all element to load #STEP 3: go to live classes #STEP 4: click on unregistration button #STEP 5: unregister from the class #STEP 6: return the index of class #STEP 7: click on registration button #STEP 8: switch to alert and complete the registration #STEP 9: logout from user #STEP 10: call the engagex test case #STEP 11: call the engagex test case #STEP 12: read the data from engagex #STEP 13:login and wait for all element to load #STEP 14: go to live classes #STEP 15: logout from user ''' #STEP 1: read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:295: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x000002316490CC40> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_SoldOutClasstoAvailableClass | 0.00 | |
self = <test_cohort.TestCohort object at 0x00000231656C20A0>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_apollo843@yopmail.com', 'email2': 'ccr50@yopmail.com', ...} @pytest.mark.test_details("SLUB-T6376","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_SoldOutClasstoAvailableClass(self,initialize_pages,testdata): ''' Objective : This test is to verify that when the class registration count reaches less the max head count, then the class should not be shown as sold out and it becomes available for other users for the registeration #STEP 1: read the data from engagex #STEP 2:login and wait for all element to load #STEP 3: go to live classes #STEP 4: click on unregistration button #STEP 5: unregister from the class #STEP 6: return the index of class #STEP 7: click on registration button #STEP 8: switch to alert and complete the registration #STEP 9: logout from user #STEP 10: call the engagex test case #STEP 11: call the engagex test case #STEP 12: read the data from engagex #STEP 13:login and wait for all element to load #STEP 14: go to live classes #STEP 15: logout from user ''' #STEP 1: read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:375: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x000002316597B520> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_Unregister_Passed | 0.82 | |
self = <test_cohort.TestCohort object at 0x0000023165843EE0>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6373","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_Unregister_Passed(self,initialize_pages,testdata): ''' Objective : This test is to verify that the user should be able to unregister the GLVC class successfully. #STEP 1: call the engagex test case #STEP 2: read the data from engagex #STEP 3:login and wait for all element to load #STEP 4: go to live classes #STEP 5: click on unregistration button #STEP 6: unregister from the class #STEP 7: logout from user #STEP 8: call the engagex test case #STEP 9: read the data from engagex #STEP 10: check the registration count has been increase ''' #STEP 1: call the engagex test case CallEngagex().get_the_registration_count_for_glvc_cohort() #STEP 2: read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:458: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x00000231656D92B0> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_SessionCancellation_InitialSessions | 0.84 | |
self = <test_cohort.TestCohort object at 0x00000231656CD9D0>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6377","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_SessionCancellation_InitialSessions(self,initialize_pages,testdata): ''' Objective : This test is to verify that when few sessions are cancelled for the class, then there should not be any impact on placement of the class card while the cancelled dates should be marked as cancelled on the class card. #STEP 1: call the engagex test case #STEP 2; read the data from engagex #STEP 3: Navigate to Login page. #STEP 4: go to live classes #STEP 5: check the given course is available #STEP 6: logout from user ''' #STEP 1: call the engagex test case CallEngagex().cancel_few_session_of_glvc_cohort() #STEP 2; read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:510: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x000002316587DE20> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_ClassCancellation | 0.88 | |
self = <test_cohort.TestCohort object at 0x0000023165981F40>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6378","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_ClassCancellation(self,initialize_pages,testdata): ''' Objective : This test is to verify that the GLVC cohort class is created successfully and displayed correctly to the cohort user. #STEP 1: call the engagex test case #STEP 2; read the data from engagex #STEP 3: Navigate to Login page. #STEP 4: go to live classes #STEP 5: check the given course is available #STEP 6: logout from user ''' #STEP 1: call the engagex test case CallEngagex().cancel_glvc_cohort_class() #STEP 2; read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:563: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x00000231659B50D0> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_cohort.py::TestCohort::test_LVC_IntegrationTest_GLVCcohortClass_Creation_SingleSession | 0.89 | |
self = <test_cohort.TestCohort object at 0x00000231659B0F70>, initialize_pages = None testdata = {'course_url': '/Phase-2---Mean/classes', 'elearning_id_url': '/courses/3920', 'email': 'iris_al7@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T6379","high","Cohort","Himanshu") def test_LVC_IntegrationTest_GLVCcohortClass_Creation_SingleSession(self,initialize_pages,testdata): ''' Objective : This test is to verify that the GLVC class is created successfully and displayed correctly to the cohort user. #STEP 1: call the engagex test case #STEP 2; read the data from engagex #STEP 3: Navigate to Login page. #STEP 4: go to live classes #STEP 5: check the given course is available #STEP 6: logout from user ''' #STEP 1: call the engagex test case CallEngagex().create_glvc_cohort_with_single_session() #STEP 2; read the data from engagex > json_object=self.pg_liveclass.readDataFromEngagex() test\test_cohort.py:600: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x0000023165AC9940> def readDataFromEngagex(self): original_path=os.getcwd() > os.chdir(r"../engagex_test_python/test/Integration Output") E FileNotFoundError: [WinError 3] The system cannot find the path specified: '../engagex_test_python/test/Integration Output' pages\liveclasses_page.py:38: FileNotFoundError | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_as_PG_user_in_program_detail_page | 35.07 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165AD9D60>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlascomfeb14t1@yopmail.com', 'password': 'Simpli@123', 'program_url': '/program/post-graduates', ...} @pytest.mark.test_details("SLUB-T17218", "Normal", "Community", "Om") def test_community_as_PG_user_in_program_detail_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on community from Program detail page, community page should be displayed Step 1: Login to paperclip as B2C PG user, click on any pg course, Go to program button Step 2: Click on community from program detail page ''' # Navigate to lms and login with valid credentials lms_login_helper.community_user_login( testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Go To Program' Button > self.pg_community.go_to_program_btn.click_button() test\test_community_btn.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.communitybtn_page.CommunityUserPage object at 0x00000231657E5AF0>, loc = 'go_to_program_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: go_to_program_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator go_to_program_btn on url http://dockerv5.simplilearn.com:8082/apachedev/git/paperclip/public/dashboard is not present [33mWARNING [0m setup:page_factory.py:57 the locator go_to_program_btn on url http://dockerv5.simplilearn.com:8082/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_as_non_PG_user_in_dashboard_page | 56.71 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165AA7400>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'b2capollo@yopmail.com', 'password': 'Simpli@123', 'username': 'b2capollo'} @pytest.mark.test_details("SLUB-T17219", "Normal", "Community", "Om") def test_community_as_non_PG_user_in_dashboard_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C non-PG user, click on community from dashboard, community page should be displayed Step 1: Login to paperclip as B2C non-PG user Step 2: Click on community from dashboard ''' # Navigate to lms and login with valid credentials lms_login_helper.community_user_login( testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) default_handle = pytest.driver.current_window_handle # Click on the 'Community' Button self.pg_community.community_btn.click_button() logging.info("Successfully clicked on community button") handles = list(pytest.driver.window_handles) for handle in handles: if default_handle != handle: pytest.driver.switch_to.window(handle) time.sleep(5) > assert testdata['username'] == self.pg_community.username_btn.get_text( ) test\test_community_btn.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.communitybtn_page.CommunityUserPage object at 0x0000023165A39A00>, loc = 'username_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: username_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_community_btn.py:67 Successfully clicked on community button [33mWARNING [0m setup:page_factory.py:57 the locator username_btn on url https://devcommunity.simplilearn.com/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_as_non_PG_user_in_learning_page | 85.34 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165A39130>, initialize_pages = None testdata = {'courses_url': '/courses/syllabus', 'dashboard_url': '/dashboard', 'email': 'b2capollo@yopmail.com', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T17220", "Normal", "Community", "Om") def test_community_as_non_PG_user_in_learning_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C non-PG user, click on community from learning environment, community page should be displayed Step 1: Login to paperclip as B2C non-PG user, click on course Step 2: Click on community from learning environment ''' # Navigate to lms and login with valid credentials lms_login_helper.community_user_login( testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Courses' Button self.pg_community.courses_btn.click_button() default_handle = pytest.driver.current_window_handle selenium_helper.wait_for_page_to_load(50, testdata['courses_url']) # Click on the 'Community' Button self.pg_community.community_btn.click_button() handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(handles[1]) time.sleep(5) > assert testdata['username'] == self.pg_community.username_btn.get_text() test\test_community_btn.py:106: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.communitybtn_page.CommunityUserPage object at 0x0000023165BC8C10>, loc = 'username_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: username_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator username_btn on url http://dockerv5.simplilearn.com:8082/apachedev/git/paperclip/public/courses/2739/Agile-Scrum-Master%28ASM%C2%AE%29/syllabus is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_as_PG_user_in_dashboard_page | 32.80 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165BBF400>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlascomfeb14t1@yopmail.com', 'password': 'Simpli@123', 'username': 'dkdmshb'} @pytest.mark.test_details("SLUB-T17221", "Normal", "Community", "Om") def test_community_as_PG_user_in_dashboard_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on community from dashboard page, community page should be displayed Step 1: Login to paperclip as B2C PG user Step 2: Click on community from dashboard ''' # Navigate to lms and login with valid credentials lms_login_helper.community_user_login( testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) default_handle = pytest.driver.current_window_handle # Click on the 'Community' Button self.pg_community.community_btn.click_button() handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(handles[1]) time.sleep(5) > assert testdata['username'] == self.pg_community.username_btn.get_text() test\test_community_btn.py:135: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.communitybtn_page.CommunityUserPage object at 0x0000023165A6F610>, loc = 'username_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: username_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator username_btn on url http://dockerv5.simplilearn.com:8082/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_as_PG_user_in_learning_page | 32.84 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165A6FFA0>, initialize_pages = None testdata = {'courses_url': '/courses/syllabus', 'dashboard_url': '/dashboard', 'email': 'atlascomfeb14t1@yopmail.com', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T17222", "Normal", "Community", "Om") def test_community_as_PG_user_in_learning_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on community from learning environment, community page should be displayed Step 1: Login to paperclip as B2C PG user, click on any pg course, go too button Step 2: Click on community from learning environment ''' # Navigate to lms and login with valid credentials lms_login_helper.community_user_login( testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Go To Program' Button > self.pg_community.go_to_program_btn.click_button() test\test_community_btn.py:159: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.communitybtn_page.CommunityUserPage object at 0x000002316544E1C0>, loc = 'go_to_program_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: go_to_program_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator go_to_program_btn on url http://dockerv5.simplilearn.com:8082/apachedev/git/paperclip/public/dashboard is not present [33mWARNING [0m setup:page_factory.py:57 the locator go_to_program_btn on url http://dockerv5.simplilearn.com:8082/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_as_non_PG_user_in_profile_page | 37.19 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165BD5460>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'b2capollo@yopmail.com', 'password': 'Simpli@123', 'username': 'b2capollo'} @pytest.mark.test_details("SLUB-T17223", "Normal", "Community", "Om") def test_community_as_non_PG_user_in_profile_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C non-PG user, click on community from profile page, community page should be displayed Step 1: Login to paperclip as B2C non-PG user, click on profile Step 2: Click on community from profile page ''' # Navigate to lms and login with valid credentials lms_login_helper.community_user_login( testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on 'Profile' Dropdown self.pg_community.profile_dropdown_btn.click_button() time.sleep(3) default_handle = pytest.driver.current_window_handle self.pg_community.profile_btn.click_button() handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(handles[1]) # Click on the 'Community' Button self.pg_community.profile_community_btn.click_button() pytest.driver.close() all_handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(all_handles[1]) time.sleep(5) > assert testdata['username'] == self.pg_community.username_btn.get_text() test\test_community_btn.py:210: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.communitybtn_page.CommunityUserPage object at 0x0000023165970880>, loc = 'username_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: username_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator username_btn on url https://devcommunity.simplilearn.com/forums/agile-and-scrum-certification-forum.343/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_as_PG_user_in_profile_page | 36.22 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165970460>, initialize_pages = None testdata = {'courses_url': '/courses/syllabus', 'dashboard_url': '/dashboard', 'email': 'atlascomfeb14t1@yopmail.com', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T17224", "Normal", "Community", "Om") def test_community_as_PG_user_in_profile_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on community from profile page, community page should be displayed Step 1: Login to paperclip as B2C PG user, click on profile Step 2: Click on community from profile page ''' # Navigate to lms and login with valid credentials lms_login_helper.community_user_login( testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on 'Profile' Dropdown self.pg_community.profile_dropdown_btn.click_button() time.sleep(3) default_handle = pytest.driver.current_window_handle # Click on 'Profile' button self.pg_community.profile_btn.click_button() handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(handles[1]) # Click on the 'Community' Button self.pg_community.profile_community_btn.click_button() pytest.driver.close() all_handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(all_handles[1]) time.sleep(5) > assert testdata['username'] == self.pg_community.username_btn.get_text() test\test_community_btn.py:248: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.communitybtn_page.CommunityUserPage object at 0x00000231659700D0>, loc = 'username_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: username_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator username_btn on url https://devcommunity.simplilearn.com/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_category_page_create_in_xenforo_based_primary_category | 19.32 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165C88D30>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'B2C Only', 'bundle_introduction': 'Abo...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15464", "High", "Community", "Om") def test_category_page_create_in_xenforo_based_primary_category(self, initialize_pages, testdata): ''' Objective: Based on the primary category selected, the category page should be created in Xenforo and in DB. Pre Condition: Bundle SEO URL should be ready Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select such category which is not existing in xenforo, Fill in the details required for bundle creation, and select the option for "Bundle available for" as B2c/Universal and click on submit Step 3: Verify if the category is created in DB or in xenforo admin, if its xenforo admin, click on forums/nodes and search for category ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:269: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165C94880>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_duplicate_category_not_allowed_in_xenforo_and_db | 18.90 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165C8ECA0>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'Universal', 'bundle_introduction': 'Ab...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15465", "High", "Community", "Om") def test_duplicate_category_not_allowed_in_xenforo_and_db(self, initialize_pages, testdata): ''' Objective: Based on the primary category selected, the category page should be created in Xenforo and in DB. Pre Condition: Bundle SEO URL should be ready Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select such category which is not existing in xenforo, Fill in the details required for bundle creation, and select the option for "Bundle available for" as B2c/Universal and click on submit Step 3: Verify if the category is created in DB or in xenforo admin, if its xenforo admin, click on forums/nodes and search for category ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:312: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165C847C0>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_bundle_creation_when_B2C_OR_universal_option_selected | 18.84 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165C94370>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'B2C Only', 'bundle_introduction': 'Abo...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15466", "High", "Community", "Om") def test_bundle_creation_when_B2C_OR_universal_option_selected(self, initialize_pages, testdata): ''' Objective: Forums should be created only when the options selected in “Bundle available for” Universal or B2C only Pre Condition: Bundle SEO URL should be ready Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select category, Fill in the details required for bundle creation, and select the option for "Bundle available for" as B2c/Universal and click on submit ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:359: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165AF25B0>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_forum_url_format_based_display_name | 18.91 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165C84F40>, initialize_pages = None testdata = {'bundle_available_for': 'Universal', 'dashboard_url': '/ice9/backend/public/', 'email': 'admin@simplilearn.com', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T15468", "High", "Community", "Om") def test_community_forum_url_format_based_display_name(self, initialize_pages, testdata): ''' Objective: The community forum URL will be auto-suggested based on the “Display name” input in this format “https://community.simplilearn.com/forums/< DisplayName>” Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select category, Fill in the details required for bundle creation, select the option for "Bundle available for" as B2c/Universal, type display name and verify if the community forum url is autosuggested with display name in this format, “https://community.simplilearn.com/forums/<displayname> ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:402: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165B7D9D0>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_community_forum_url_format_not_editable | 18.95 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165AF2AC0>, initialize_pages = None testdata = {'bundle_available_for': 'B2C Only', 'dashboard_url': '/ice9/backend/public/', 'email': 'admin@simplilearn.com', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T15469", "High", "Community", "Om") def test_community_forum_url_format_not_editable(self, initialize_pages, testdata): ''' Objective: The display name inside the auto suggested community forum url field cannot be editable by the user, unless the user is changing display name before creating bundle Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select category, Fill in the details required for bundle creation, select the option for "Bundle available for" as B2c/Universal, type display name and verify if the community forum url is autosuggested with display name in this format, “https://community.simplilearn.com/forums/<displayname> Step 3: Click on commmunity forum url, it should not be editable unless making any changes in display ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:425: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165B7DC70>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_forum_should_create_on_successful_bundle_creation | 18.94 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165D12490>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'Universal', 'bundle_introduction': 'Ab...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15471", "High", "Community", "Om") def test_forum_should_create_on_successful_bundle_creation(self, initialize_pages, testdata): ''' Objective: On successful save of this entire bundle creation, the forum page should be created with the suggested URL under the selected Primary Category. Pre Condition: Bundle SEO URL should be ready Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select category, Fill in the details required for bundle creation, and select the option for "Bundle available for" as B2c/Universal and click on submit ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:445: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165D12400>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_mandatory_forum_should_create_on_successful_bundle_creation | 18.86 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165D944C0>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'B2C Only', 'bundle_introduction': 'Abo...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15472", "High", "Community", "Om") def test_mandatory_forum_should_create_on_successful_bundle_creation(self, initialize_pages, testdata): ''' Objective: On bundle creation Along with this, the system should have “Certification program forum” & “Skill up program forum” page - R/W access to the assigned certificate and skillup users only Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select such category which is not existing in xenforo or in db, Fill in the details required for bundle creation and click on submit Step 3: Verify if the forum is created in DB or in xenforo admin, if its xenforo admin, click on forums/nodes and search for forum ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:494: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165C6DCD0>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_learners_have_read_write_access_to_respective_forum | 18.87 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165C6D310>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'Universal', 'bundle_introduction': 'Ab...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15473", "High", "Community", "Om") def test_learners_have_read_write_access_to_respective_forum(self, initialize_pages, testdata): ''' Objective: All the learners who have bundle ID assigned should have Read and Write access to the respective forum page only. Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select category, Fill in the details required for bundle creation, and select the option for "Bundle available for" as B2c/Universal and click on submit ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:546: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165C6D670>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_for_one_primary_category_one_certification_program | 18.90 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165C6D340>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'B2C Only', 'bundle_introduction': 'Abo...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15476", "High", "Community", "Om") def test_for_one_primary_category_one_certification_program(self, initialize_pages, testdata): ''' Objective: For 1 Primary category, there will be only 1 Certification forum only that will be created on xenforo and database Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select such category which is not existing in xenforo, Fill in the details required for bundle creation, and select the option for "Bundle available for" as B2c/Universal and click on submit Step 3: Verify if the forum is created in DB or in xenforo admin, if its xenforo admin, click on forums/nodes and search for forum ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:596: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165C88AF0>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_community_btn.py::TestCommunityBtn::test_for_one_primary_category_one_skillUp_program | 18.81 | |
self = <test_community_btn.TestCommunityBtn object at 0x0000023165CCE700>, initialize_pages = None testdata = {'banner_image_path': '/upload_file/Banner_Image.jpg', 'bundle_available_for': 'B2C Only', 'bundle_introduction': 'Abo...nd .NET Programming', 'certificate_image_link': 'https://www.simplilearn.com/ice9/course_images/160x160/EC2.svgz', ...} @pytest.mark.test_details("SLUB-T15479", "High", "Community", "Om") def test_for_one_primary_category_one_skillUp_program(self, initialize_pages, testdata): ''' Objective: For 1 Primary category, there will be only 1 skill up forum only that will be created on xenforo and database Step 1: Login to simplex as admin, hover on list, click on bundles, click on add more Step 2: Select such category which is not existing in xenforo, Fill in the details required for bundle creation, and select the option for "Bundle available for" as B2c/Universal and click on submit Step 3: Verify if the forum is created in DB or in xenforo admin, if its xenforo admin, click on forums/nodes and search for forum ''' # Navigate to simplex and login with valid credentials > simplex_login_helper.simplex_community_login( testdata['email'], testdata['password']) test\test_community_btn.py:647: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\simplex_login_helper.py:22: in simplex_community_login pg_simplex_community.login(email, password) pages\simplex_page.py:19: in login self.textbox_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.simplex_page.SimplexPage object at 0x0000023165DCBB50>, loc = 'textbox_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: textbox_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present [33mWARNING [0m setup:page_factory.py:57 the locator textbox_email on url http://dockerv5.simplilearn.com:8082/apachedev/git/ice9/backend/public/ is not present | |||
Failed | test_elearningpagetab.py::TestElearningPageTab::test_elearningpage_visibility | 2.18 | |
self = <test_elearningpagetab.TestElearningPageTab object at 0x0000023165C7CD90>, initialize_pages = None testdata = {'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Elearning Tab","Yachana") def test_elearningpage_visibility(self,initialize_pages,testdata): ''' Objective : check on the functionality of elearning tab . Step1: Navigate to Login page.. Step2: Verify user redirected to Forgot Password Page Step3: Enter all the details of existing user on Forgot Password Page and click on send button . ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elearningpagetab.py:35: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_register_for_class | 0.12 | |
self = <test_elvc.TestElvc object at 0x0000023165BBFDC0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3969","high","Elvc","Himanshu") def test_register_for_class(self,initialize_pages,testdata): ''' Objective : To register for the class . STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of classes STEP 5: click on registration button and confirm the registation STEP 6: check the registration is completed ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_register_button_present | 1.95 | |
self = <test_elvc.TestElvc object at 0x0000023165CDBCD0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3951","high","Elvc","Himanshu") def test_register_button_present(self,initialize_pages,testdata): ''' Objective : To check regirtation button present. STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of classes STEP 5: if the class is starting soon STEP 6: the registration button present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:107: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_unregister_for_class | 0.13 | |
self = <test_elvc.TestElvc object at 0x0000023165D24D60>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3970","high","Elvc","Himanshu") def test_unregister_for_class(self,initialize_pages,testdata): ''' Objective : To unregister for the class . STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get the course details STEP 5: click on ellipses button and unregister class STEP 6: click on yes got it to confirm STEP 7: got to the availble classes STEP 8: check the unregister class is present or not ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_starting_soon_tag | 1.91 | |
self = <test_elvc.TestElvc object at 0x0000023165C2BD30>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4032","high","Elvc","Himanshu") def test_starting_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if starting tag is present the starting date must be greater than the current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is starting soon STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is greater than current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:225: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_progress_soon_tag | 0.11 | |
self = <test_elvc.TestElvc object at 0x0000023165E64EE0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc","Himanshu") def test_progress_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if progess tag is present then starting date must be less than the current date and end date must be greater than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is in progress STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is less than current date and end date is greater then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:289: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_over_tag | 1.92 | |
self = <test_elvc.TestElvc object at 0x0000023165DC0F40>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4034","high","Elvc","Himanshu") def test_over_tag(self,initialize_pages,testdata): ''' Objective : To check if over tag is present then end date must be less than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is in over STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the end date is less then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:362: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_myclasses_starting_soon_tag | 2.16 | |
self = <test_elvc.TestElvc object at 0x0000023165E4E520>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3973","high","Elvc","Himanshu") def test_myclasses_starting_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if starting tag is present the starting date must be greater than the current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get name of details of class STEP 5: if the class is starting soon STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is greater than current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:426: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_myclasses_progress_soon_tag | 0.16 | |
self = <test_elvc.TestElvc object at 0x0000023165EA9FD0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc","Himanshu") def test_myclasses_progress_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if progess tag is present then starting date must be less than the current date and end date must be greater than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get name of details of class STEP 5: if the class is in progress STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is less than current date and end date is greater then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:488: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_available_class_button_present | 1.89 | |
self = <test_elvc.TestElvc object at 0x0000023165C512E0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc","Himanshu") def test_available_class_button_present(self,initialize_pages,testdata): ''' Objective : To check the avaliable class button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the availabe class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:548: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_my_class_button_present | 0.19 | |
self = <test_elvc.TestElvc object at 0x0000023165E9C5E0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc","Himanshu") def test_my_class_button_present(self,initialize_pages,testdata): ''' Objective : To check the my class button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the my class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:588: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_past_class_button_present | 1.85 | |
self = <test_elvc.TestElvc object at 0x0000023165B64D30>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc","Himanshu") def test_past_class_button_present(self,initialize_pages,testdata): ''' Objective : To check the past class button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the availabe class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:628: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc.py::TestElvc::test_class_registration_policy_button_present | 0.19 | |
self = <test_elvc.TestElvc object at 0x0000023165E08A60>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc","Himanshu") def test_class_registration_policy_button_present(self,initialize_pages,testdata): ''' Objective : To check the class_registration_policy button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the availabe class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc.py:667: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_register_for_class | 1.87 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x000002316609B070>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3969","high","Elvc1536Resolution","Himanshu") def test_register_for_class(self,initialize_pages,testdata): ''' Objective : To register elvc for the class . STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of classes STEP 5: click on registration button and confirm the registation STEP 6: check the registration is completed ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_register_button_present | 2.21 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x0000023165EBDB20>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3951","high","Elvc1536Resolution","Himanshu") def test_register_button_present(self,initialize_pages,testdata): ''' Objective : To check regirtation button present. STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of classes STEP 5: if the class is starting soon STEP 6: the registration button present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:102: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_unregister_for_class | 0.10 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x0000023165EB23A0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3970","high","Elvc1536Resolution","Himanshu") def test_unregister_for_class(self,initialize_pages,testdata): ''' Objective : To unregister for the class elvc. STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get the course details STEP 5: click on ellipses button and unregister class STEP 6: click on yes got it to confirm STEP 7: got to the availble classes STEP 8: check the unregister class is present or not ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:157: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_starting_soon_tag | 1.96 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x00000231661562E0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4032","high","Elvc1536Resolution","Himanshu") def test_starting_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if starting tag is present the starting date must be greater than the current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is starting soon STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is greater than current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:224: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_progress_soon_tag | 0.11 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x0000023165F7E580>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc1536Resolution","Himanshu") def test_progress_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if progess tag is present then starting date must be less than the current date and end date must be greater than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is in progress STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is less than current date and end date is greater then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:289: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_over_tag | 1.98 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x000002316611BF40>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4034","high","Elvc1536Resolution","Himanshu") def test_over_tag(self,initialize_pages,testdata): ''' Objective : To check if over tag is present then end date must be less than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is in over STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the end date is less then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:361: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_myclasses_starting_soon_tag | 0.10 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x0000023165D78D90>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3973","high","Elvc1536Resolution","Himanshu") def test_myclasses_starting_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if starting tag is present the starting date must be greater than the current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get name of details of class STEP 5: if the class is starting soon STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is greater than current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:423: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_myclasses_progress_soon_tag | 1.91 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x000002316605C1C0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc1536Resolution","Himanshu") def test_myclasses_progress_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if progess tag is present then starting date must be less than the current date and end date must be greater than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get name of details of class STEP 5: if the class is in progress STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is less than current date and end date is greater then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:486: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_available_class_button_present | 0.19 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x00000231660CF5B0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc1536Resolution","Himanshu") def test_available_class_button_present(self,initialize_pages,testdata): ''' Objective : To check the avaliable class button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the availabe class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:547: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_my_class_button_present | 1.69 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x000002316605CDF0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc1536Resolution","Himanshu") def test_my_class_button_present(self,initialize_pages,testdata): ''' Objective : To check the my class button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the my class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:587: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_past_class_button_present | 0.38 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x00000231660E9850>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc1536Resolution","Himanshu") def test_past_class_button_present(self,initialize_pages,testdata): ''' Objective : To check the past class button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the availabe class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:623: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_elvc_1536_864_resolution.py::TestElvc1536Resolution::test_class_registration_policy_button_present | 1.68 | |
self = <test_elvc_1536_864_resolution.TestElvc1536Resolution object at 0x00000231660B4CD0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Elvc1536Resolution","Himanshu") def test_class_registration_policy_button_present(self,initialize_pages,testdata): ''' Objective : To check the class_registration_policy button is present STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: to check the availabe class present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_elvc_1536_864_resolution.py:659: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_focus_course.py::TestFocusCourse::test_set_focus_course | 0.36 | |
self = <test_focus_course.TestFocusCourse object at 0x0000023165F6EBB0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Focus course","Himanshu") def test_set_focus_course(self,initialize_pages,testdata): ''' Objective : To set the course as focus course #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: get detaials of all the courses #STEP 3: find the course with Full access #STEP 4: if the course contain the Full excess #STEP 5: click on the ellapses button #STEP 6: click on set as a focus course #STEP 7: click on proceed to confirm #STEP 8: Verify the course selected is set as focus course ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_focus_course.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_focus_course.py::TestFocusCourse::test_edit_focus_course | 1.69 | |
self = <test_focus_course.TestFocusCourse object at 0x0000023165F003D0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Focus course","Himanshu") def test_edit_focus_course(self,initialize_pages,testdata): ''' Objective : To edit the focus course and set different course as focus course #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: click on edit focus course #STEP 3: select course and proceed #STEP 4: proceed to confirm to set the course as a focus course #Step 5: Verify the course is set as the focus course ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_focus_course.py:104: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_focus_course.py::TestFocusCourse::test_set_study_plan | 0.37 | |
self = <test_focus_course.TestFocusCourse object at 0x00000231661EB940>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Focus course","Himanshu") def test_set_study_plan(self,initialize_pages,testdata): ''' Objective : To make change in study hours in focus course #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: click on study plan in focus course #STEP 3: change the hourse and proceed #STEP 4: Verify the study plan has changed ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_focus_course.py:143: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_forgotpassword.py::TestForgotPassword::test_forgotpasswword_functionality | 5.17 | |
self = <test_forgotpassword.TestForgotPassword object at 0x00000231661CBD90>, initialize_pages = None testdata = {'email': 'simplilearnautomation@gmail.com', 'email_details': {'email_subject': 'reset your Simplilearn password', 'pa...e': 'reset'}, 'forgetpassword_url': '/forgot-password', 'sent_msg': 'We have sent the link to reset your password at '} @pytest.mark.test_details("SLUB-T1432","high","Forgot Password","Pavan") def test_forgotpasswword_functionality(self,initialize_pages,testdata): ''' Objective : To verify forgotpassword functionality . Step1: Navigate to LMS Login url and click on forgot password link . Step2: Verify user redirected to Forgot Password Page Step3: Enter all the details of existing user on Forgot Password Page and click on send button . ''' #Step1: Navigate to Login page.. > pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) test\test_forgotpassword.py:30: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_forgotpassword.py::TestForgotPassword::test_forgotpassword_with_invalid_user | 1.86 | |
self = <test_forgotpassword.TestForgotPassword object at 0x0000023166261E80>, initialize_pages = None testdata = {'email': 'Test', 'err_msg': 'No active account found', 'err_valid_email': 'Please enter a valid email address'} @pytest.mark.test_details("SLUB-T1432","high","Forgot Password","Pavan") def test_forgotpassword_with_invalid_user(self,initialize_pages,testdata): ''' Objective : To verify forgotpassword functionality with invalid user . Step1: Navigate to LMS Login url and click on forgot password link . Step2: Enter all the details on Forgot Password Page and click on send button using random email Step3: Verify error message and refresh the page Step4: Enter all the details on Forgot Password Page and click on send button using invalid email Step5 : Verify error message and refresh the page ''' #Step1: Navigate to Login page.. > pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) test\test_forgotpassword.py:58: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_full_access.py::TestFullAccess::test_access_selflearning | 0.21 | |
self = <test_full_access.TestFullAccess object at 0x0000023165FE34C0>, initialize_pages = None testdata = {'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","full access","Himanshu") def test_access_selflearning(self,initialize_pages,testdata): ''' Objective : To verify the if the course is limited access user is unable to update it #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: find the course with limited access #STEP 4: find the limited access course found the loop is executed #STEP 5: go to the course #STEP 6: chech the self learning video is avalible ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_full_access.py:40: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_register_for_class | 1.89 | |
self = <test_glvc.TestGlvc object at 0x0000023166327EE0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3969","high","Glvc","Himanshu") def test_register_for_class(self,initialize_pages,testdata): ''' Objective : To register for the class . STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of classes STEP 5: click on registration button and confirm the registation STEP 6: check the registration is completed ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_register_button_present | 2.16 | |
self = <test_glvc.TestGlvc object at 0x0000023166352BE0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3951","high","Glvc","Himanshu") def test_register_button_present(self,initialize_pages,testdata): ''' Objective : To check regirtation button present. STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of classes STEP 5: if the class is starting soon STEP 6: the registration button present ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:100: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_unregister_for_class | 0.68 | |
self = <test_glvc.TestGlvc object at 0x000002316632A610>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3970","high","Glvc","Himanshu") def test_unregister_for_class(self,initialize_pages,testdata): ''' Objective : To unregister for the class . STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get the course details STEP 5: click on ellipses button and unregister class STEP 6: click on yes got it to confirm STEP 7: got to the availble classes STEP 8: check the unregister class is present or not ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:150: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_starting_soon_tag | 1.37 | |
self = <test_glvc.TestGlvc object at 0x00000231661E4340>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4032","high","Glvc","Himanshu") def test_starting_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if starting tag is present the starting date must be greater than the current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is starting soon STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is greater than current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_progress_soon_tag | 1.36 | |
self = <test_glvc.TestGlvc object at 0x00000231663DFD30>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Glvc","Himanshu") def test_progress_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if progess tag is present then starting date must be less than the current date and end date must be greater than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is in progress STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is less than current date and end date is greater then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_over_tag | 0.73 | |
self = <test_glvc.TestGlvc object at 0x000002316637CFD0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4034","high","Glvc","Himanshu") def test_over_tag(self,initialize_pages,testdata): ''' Objective : To check if over tag is present then end date must be less than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses and click on available classes STEP 4: get name of details of class STEP 5: if the class is in over STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the end date is less then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_myclasses_starting_soon_tag | 1.34 | |
self = <test_glvc.TestGlvc object at 0x00000231662EE400>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T3973","high","Glvc","Himanshu") def test_myclasses_starting_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if starting tag is present the starting date must be greater than the current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get name of details of class STEP 5: if the class is starting soon STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is greater than current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:414: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_glvc.py::TestGlvc::test_myclasses_progress_soon_tag | 0.72 | |
self = <test_glvc.TestGlvc object at 0x000002316639BCD0>, initialize_pages = None testdata = {'course_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234/syllabus', 'email': 'BQnewtest1@yopmail.com', 'lms_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T4033","high","Glvc","Himanshu") def test_myclasses_progress_soon_tag(self,initialize_pages,testdata): ''' Objective : To check if progess tag is present then starting date must be less than the current date and end date must be greater than current date STEP 1: Navigate to Login page.. STEP 2: redirected to course STEP 3: go to the liveclasses STEP 4: get name of details of class STEP 5: if the class is in progress STEP 6: get the date and timings of classes STEP 7: get today's day and put the date in datatime STEP 8: check if the starting date is less than current date and end date is greater then current date ''' #Step1: Navigate to Login page. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_glvc.py:472: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_b2c_PG_user_in_program_page | 50.66 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231662CF7F0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'hnsupportt@yopmail.com', 'password': 'Simpli@123', 'program_url': '/program/post-graduates'} @pytest.mark.test_details("SLUB-T17189","Normal","Help&Support","Om") def test_help_functionality_as_b2c_PG_user_in_program_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on help from Program detail page, HnS window should be displayed Step 1: Login to paperclip as B2C PG user, click on any pg course go to button Step 2: Click on Help from program detail page ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Go To Program' Button self.pg_hns_user.go_to_program_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['program_url']) # Click on the 'Help' Button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 20) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 20) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:38: AssertionError -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/program/post-graduates/276/Post%20Graduate%20Diploma%20in%20Management%20by%20JAGSOM/prerequisites is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_b2c_non_PG_user_in_dashboard_page | 45.94 | |
self = <test_help&support.TestHelpAndSupport object at 0x000002316643DFD0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlascpmdemo1@yopmail.com', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T17190","Normal","Help&Support","Om") def test_help_functionality_as_b2c_non_PG_user_in_dashboard_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C non-PG user, click on help from dashboard, HnS window should be displayed Step 1: Login to paperclip as B2C non-PG user Step 2: Click on Help from dasboard ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Help' Button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 20) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 20) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:57: AssertionError -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_b2c_non_PG_user_in_program_page | 57.30 | |
self = <test_help&support.TestHelpAndSupport object at 0x0000023166441400>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlascpmdemo1@yopmail.com', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T17191","Normal","Help&Support","Om") def test_help_functionality_as_b2c_non_PG_user_in_program_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C non-PG user, click on help from learning environment, HnS window should be displayed Step 1: Login to paperclip as B2C non-PG user, click on certification course. Step 2: Click on Help from learning environment ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on 'Certification Program' button self.pg_hns_user.certification_program.click_button() # Click on 'Help' button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 30) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 30) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:81: AssertionError -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_b2c_PG_user_in_dashboard_page | 59.46 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231664ADDF0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'hnsupportt@yopmail.com', 'password': 'Simpli@123', 'program_url': '/program/post-graduates'} @pytest.mark.test_details("SLUB-T17197","Normal","Help&Support","Om") def test_help_functionality_as_b2c_PG_user_in_dashboard_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on help from dashboard page, HnS window should be displayed Step 1: Login to paperclip as B2C PG user Step 2: Click on Help from dashboard ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Go To Program' Button self.pg_hns_user.go_to_program_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['program_url']) # Click on 'Help' button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 30) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 30) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:105: AssertionError -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/program/post-graduates/276/Post%20Graduate%20Diploma%20in%20Management%20by%20JAGSOM/prerequisites is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_b2c_PG_user_in_learning_page | 60.98 | |
self = <test_help&support.TestHelpAndSupport object at 0x000002316651C460>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'hnsupportt@yopmail.com', 'liveclasses_url': 'courses/2738/Business-Analytics-with-Excel/syllabus', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T17198","Normal","Help&Support","Om") def test_help_functionality_as_b2c_PG_user_in_learning_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on help from learning environment, HnS window should be displayed Step 1: Login to paperclip as B2C PG user, click on any pg course go to program button Step 2: Click on any course on program detail page Step 3: Click on help from learning environment ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Go To Program' Button self.pg_hns_user.go_to_program_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['program_url']) # Click on 'Courses' button self.pg_hns_user.courses_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['liveclasses_url']) # Click on 'Help' button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 20) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 20) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:131: AssertionError -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/courses/2738/Business-Analytics-with-Excel/syllabus is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_b2c_non_PG_user_in_profile_page | 108.84 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231661F4850>, initialize_pages = None testdata = {'courses_url': '/program/post-graduates', 'dashboard_url': '/dashboard', 'email': 'atlascpmdemo1@yopmail.com', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T17199","Normal","Help&Support","Om") def test_help_functionality_as_b2c_non_PG_user_in_profile_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C non-PG user, click on profile Step 1: Login to paperclip as B2C non-PG user, click on profile Step 2: Click on Help from profile page ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on 'Profile' Dropdown self.pg_hns_user.profile_dropdown_btn.click_button() time.sleep(3) default_handle = pytest.driver.current_window_handle # Click on 'profile' button self.pg_hns_user.profile_btn.click_button() handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(handles[1]) selenium_helper.wait_for_page_to_load(50, testdata['profile_url']) # Click on "Help" button self.pg_hns_user.profile_help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 30) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 30) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:160: AssertionError -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_b2c_PG_user_in_profile_page | 108.57 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231666E0C70>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'hnsupportt@yopmail.com', 'password': 'Simpli@123', 'profile_url': '/user/profile'} @pytest.mark.test_details("SLUB-T17200","Normal","Help&Support","Om") def test_help_functionality_as_b2c_PG_user_in_profile_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2C PG user, click on help from profile page, HnS window should be displayed Step 1: Login to paperclip as B2C PG user, click on profile Step 2: Click on Help from profile page ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on 'Profile' Dropdown self.pg_hns_user.profile_dropdown_btn.click_button() time.sleep(3) default_handle = pytest.driver.current_window_handle # Click on 'profile' button self.pg_hns_user.profile_btn.click_button() handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(handles[1]) time.sleep(10) selenium_helper.wait_for_page_to_load(50, testdata['profile_url']) # Click on "Help" button self.pg_hns_user.profile_help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 20) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 20) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:192: AssertionError -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_B2B_PG_user_in_program_page | 91.36 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231666544F0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlas-oct-26-t1@yopmail.com', 'password': 'Simpli@123', 'program_url': '/program/post-graduates'} @pytest.mark.test_details("SLUB-T17206","Normal","Help&Support","Om") def test_help_functionality_as_B2B_PG_user_in_program_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2B PG user, click on help from Program detail page, HnS window should be displayed Step 1: Login to paperclip as B2C PG user, click on profile Step 2: Click on Help from profile page ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Go To Program' Button self.pg_hns_user.go_to_program_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['program_url']) # Click on "Help" button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 40) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 40) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:216: AssertionError -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator lnk_lms_account on url http://dockerv5.simplilearn.com:8085/apachedev/git/cloud6/public/user/multi-account is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/program/post-graduates/214/Complimentary%20Courses:%20PGP%20in%20Business%20Analysis/courses is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_B2B_PG_user_in_dashboard_page | 75.77 | |
self = <test_help&support.TestHelpAndSupport object at 0x0000023166583F10>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlas-oct-26-t1@yopmail.com', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T17209","Normal","Help&Support","Om") def test_help_functionality_as_B2B_PG_user_in_dashboard_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2B PG user, click on help from dashboard page, HnS window should be displayed Step 1: Login to paperclip as B2B PG user Step 2: Click on Help from dashboard ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on "Help" button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 40) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 40) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:234: AssertionError -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator lnk_lms_account on url http://dockerv5.simplilearn.com:8085/apachedev/git/cloud6/public/user/multi-account is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_B2B_PG_user_in_learning_page | 112.85 | |
self = <test_help&support.TestHelpAndSupport object at 0x0000023166601DC0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlas-oct-26-t1@yopmail.com', 'liveclasses_url': '/courses/3175/Digital-Transformation/syllabus', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T17210","Normal","Help&Support","Om") def test_help_functionality_as_B2B_PG_user_in_learning_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2B PG user, click on help from learning environment, HnS window should be displayed Step 1: Login to paperclip as B2B PG user, click on any pg course Step 2: Click on any course on program detail page Step 3: Click on help from learning enviornment ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on the 'Go To Program' Button self.pg_hns_user.go_to_program_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['program_url']) # Click on 'Courses' button self.pg_hns_user.courses_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['liveclasses_url']) # Click on "Help" button self.pg_hns_user.help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 40) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 40) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:260: AssertionError -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator lnk_lms_account on url http://dockerv5.simplilearn.com:8085/apachedev/git/cloud6/public/user/multi-account is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/courses/3175/Digital-Transformation/syllabus is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_help_functionality_as_B2B_PG_user_in_profile_page | 139.79 | |
self = <test_help&support.TestHelpAndSupport object at 0x0000023166621820>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlas-oct-26-t1@yopmail.com', 'password': 'Simpli@123', 'profile_url': '/user/profile'} @pytest.mark.test_details("SLUB-T17210","Normal","Help&Support","Om") def test_help_functionality_as_B2B_PG_user_in_profile_page(self, initialize_pages, testdata): ''' Objective: Login to paperclip as B2B PG user, click on help from profile page, HnS window should be displayed Step 1: Login to paperclip as B2B PG user, click on profile Step 2: Click on Help from profile page ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) # Click on 'Profile' Dropdown self.pg_hns_user.profile_dropdown_btn.click_button() time.sleep(3) default_handle = pytest.driver.current_window_handle # Click on 'Profile' button self.pg_hns_user.profile_btn.click_button() handles = list(pytest.driver.window_handles) if len(handles) > 1: pytest.driver.switch_to.window(handles[1]) time.sleep(10) selenium_helper.wait_for_page_to_load(50, testdata['profile_url']) # Click on "Help" button self.pg_hns_user.profile_help_btn.click_button() > assert selenium_helper.is_element_present(self.pg_hns_user.locators['help_search_btn'][0], 40) E assert False E + where False = <function is_element_present at 0x000002315D4413A0>(['xpath', "//input[@id='input-11']"], 40) E + where <function is_element_present at 0x000002315D4413A0> = selenium_helper.is_element_present test\test_help&support.py:290: AssertionError -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator lnk_lms_account on url http://dockerv5.simplilearn.com:8085/apachedev/git/cloud6/public/user/multi-account is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//input[@id='input-11']") on url http://dockerv5.simplilearn.com:8085/apachedev/git/paperclip/public/dashboard is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_create_support_ticket_for_B2C_only_PG_user | 285.11 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231665655E0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'hnsupportt@yopmail.com', 'issue_text': 'Video progress & play issue Self Learning - Progress, Videos, Material Profile', 'lightning_salesforce_url': 'lightning.force.com/lightning/page/', ...} @pytest.mark.test_details("SLUB-T17836","High","Help&Support","Om") def test_create_support_ticket_for_B2C_only_PG_user(self, initialize_pages, testdata): ''' Objective: If the user is B2C Only pg user, clicks on help and support, and if they click on get assistance, it will create support ticket, it will never invoke aarya Step 1: Login to paperclip as b2c selected pg user, click on help and support Step 2: Click on get assistance option Step 3: Fil in category, course and sub category in aarya Step 4: Login to salesforce, search the ticket number in search box ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.help_btn.click_button() time.sleep(20) self.pg_hns_user.get_assistant_btn.click_button() self.pg_hns_user.raise_support_ticket_for_B2C_only_PG_user(testdata['issue_text']) time.sleep(10) selenium_helper.is_element_present(self.pg_hns_user.locators['tkt_no_for_only_PG_user'][0], 20) logging.info('Support ticket raised successfully') tkt_value = self.pg_hns_user.tkt_no_for_only_PG_user.get_text() self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) # logout from LMS user lms_login_helper.logout() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to Salesforce and login with valid credentials salesforce_login_helper.sf_login() if selenium_helper.is_element_present(self.pg_hns_user.locators['switch_to_lightning_btn'][0], 20): self.pg_hns_user.switch_to_lightning_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['lightning_salesforce_url']) if selenium_helper.is_element_present(self.pg_hns_user.locators['salesforce_search_history'][0], 10): search_history = self.pg_hns_user.salesforce_search_history.get_all_elements() if len(search_history)>1: for value in range(1, len(search_history)): time.sleep(3) self.pg_hns_user.salesforce_search_history_close_btn.click_button() time.sleep(3) self.pg_hns_user.search_and_get_support_ticket(tkt_value) time.sleep(3) > self.pg_hns_user.result_tkt_no.scroll_to_element() test\test_help&support.py:339: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.hnsuser_page.HnsUserPage object at 0x000002316656FEE0>, loc = 'result_tkt_no' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: result_tkt_no core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_help&support.py:317 Support ticket raised successfully [33mWARNING [0m setup:page_factory.py:66 the locator salesforce_search_history on url https://simplilearn--partialqa.lightning.force.com/lightning/r/User/0051s000002OEIUAA4/view?ws=%2Flightning%2Fr%2FRound_Robin__c%2Fa0Q2x000004KNXfEAO%2Fview&0.source=alohaHeader is not visible [33mWARNING [0m setup:page_factory.py:57 the locator result_tkt_no on url https://simplilearn--partialqa.lightning.force.com/one/one.app?source=alohaHeader#eyJjb21wb25lbnREZWYiOiJmb3JjZVNlYXJjaDpzZWFyY2hQYWdlRGVza3RvcCIsImF0dHJpYnV0ZXMiOnsidGVybSI6IjAxMjI4NTQzIiwic2NvcGVNYXAiOnsidHlwZSI6IlRPUF9SRVNVTFRTIn0sImNvbnRleHQiOnsiRklMVEVSUyI6e30sInNlYXJjaFNvdXJjZSI6IkFTU0lTVEFOVF9ESUFMT0ciLCJkaXNhYmxlSW50ZW50UXVlcnkiOmZhbHNlLCJkaXNhYmxlU3BlbGxDb3JyZWN0aW9uIjpmYWxzZSwicGVybXNBbmRQcmVmcyI6eyJTZWFyY2hVaS5mZWVkYmFja0NvbXBvbmVudEVuYWJsZWQiOmZhbHNlLCJPcmdQcmVmZXJlbmNlcy5DaGF0dGVyRW5hYmxlZCI6dHJ1ZSwiU2VhcmNoLmNyb3NzT2JqZWN0c0F1dG9TdWdnZXN0RW5hYmxlZCI6dHJ1ZSwiT3JnUHJlZmVyZW5jZXMuRWluc3RlaW5TZWFyY2hOYXR1cmFsTGFuZ3VhZ2VFbmFibGVkIjp0cnVlLCJTZWFyY2hVaS5zZWFyY2hVSUludGVyYWN0aW9uTG9nZ2luZ0VuYWJsZWQiOmZhbHNlLCJNeVNlYXJjaC51c2VyQ2FuSGF2ZU15U2VhcmNoQmVzdFJlc3VsdCI6dHJ1ZX0sInNlYXJjaERpYWxvZ1Nlc3Npb25JZCI6IjZiYWVmYzU0LTU2MWMtNjkwMy02MjEyLTIzN2U3NWZiNDI4NCIsImRlYnVnSW5mbyI6eyJhcHBOYW1lIjoiTGlnaHRuaW5nU2VydmljZSIsImFwcFR5cGUiOiJDb25zb2xlIiwiYXBwTmFtZXNwYWNlIjoic3RhbmRhcmQiLCJsb2NhdGlvbiI6ImhvbWU6bGFuZGluZyJ9fSwiZ3JvdXBJZCI6IkRFRkFVTFQifSwic3RhdGUiOnt9fQ%3D%3D is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_create_support_ticket_for_B2C_selected_PG_user_if_agent_unavailable | 446.15 | |
self = <test_help&support.TestHelpAndSupport object at 0x0000023166569400>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlas-sahana-test1@yopmail.com', 'issue_text': 'Video progress & play issue ...Learning - Progress, Videos, Material Profile', 'lightning_salesforce_url': 'lightning.force.com/lightning/page/', ...} @pytest.mark.test_details("SLUB-T17837","High","Help&Support","Om") def test_create_support_ticket_for_B2C_selected_PG_user_if_agent_unavailable(self, initialize_pages, testdata): ''' Objective: If the user is B2C selected pg user, clicks on help and support, if agent is unavailable it should create support ticket Step 1: Login to paperclip as b2c selected pg user, click on help and support Step 2: Click on chat with us option Step 3: Login to salesforce, click on omnichannel, make agent offline Step 4: Switch to Docker window, clicks on help and support, Submit category, course and sub category in aarya Step 5: Login to salesforce, search the ticket number in search box ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.help_btn.click_button() time.sleep(20) self.pg_hns_user.chat_with_us_btn.click_button() assert selenium_helper.is_element_present(self.pg_hns_user.locators['chat_textbox_btn'][0], 50) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) # logout from LMS user lms_login_helper.logout() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to Salesforce and login with valid credentials salesforce_login_helper.sf_login() if selenium_helper.is_element_present(self.pg_hns_user.locators['switch_to_lightning_btn'][0], 20): self.pg_hns_user.switch_to_lightning_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['lightning_salesforce_url']) self.pg_hns_user.make_omniChannel_offline() time.sleep(5) logging.info('Agent is Offline') # Logout from salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() else: self.pg_hns_user.make_omniChannel_offline() time.sleep(5) logging.info('Agent is Offline') # Logout from salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.raise_support_ticket_for_B2C_selected_PG_user(testdata['subCategory'], testdata['issue_text']) time.sleep(10) selenium_helper.is_element_present(self.pg_hns_user.locators['tkt_no_for_selected_PG_user'][0], 20) logging.info('Support ticket raised successfully') support_tkt_no = self.pg_hns_user.tkt_no_for_selected_PG_user.get_text() tkt_value = support_tkt_no[11:19] time.sleep(2) pytest.driver.switch_to.default_content() time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) # logout from LMS user lms_login_helper.logout() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to Salesforce and login with valid credentials salesforce_login_helper.sf_login() if selenium_helper.is_element_present(self.pg_hns_user.locators['switch_to_lightning_btn'][0], 20): self.pg_hns_user.switch_to_lightning_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['lightning_salesforce_url']) if selenium_helper.is_element_present(self.pg_hns_user.locators['salesforce_search_history'][0], 10): search_history = self.pg_hns_user.salesforce_search_history.get_all_elements() if len(search_history)>1: for value in range(1, len(search_history)): time.sleep(3) self.pg_hns_user.salesforce_search_history_close_btn.click_button() time.sleep(3) self.pg_hns_user.search_and_get_support_ticket(tkt_value) time.sleep(3) self.pg_hns_user.result_tkt_no.scroll_to_element() time.sleep(2) assert self.pg_hns_user.result_tkt_no.get_attribute('title') == tkt_value time.sleep(2) # Logout from salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() else: if selenium_helper.is_element_present(self.pg_hns_user.locators['salesforce_search_history'][0], 10): search_history = self.pg_hns_user.salesforce_search_history.get_all_elements() if len(search_history)>1: for value in range(1, len(search_history)): time.sleep(3) self.pg_hns_user.salesforce_search_history_close_btn.click_button() time.sleep(3) self.pg_hns_user.search_and_get_support_ticket(tkt_value) time.sleep(3) > self.pg_hns_user.result_tkt_no.scroll_to_element() test\test_help&support.py:462: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.hnsuser_page.HnsUserPage object at 0x0000023166692EB0>, loc = 'result_tkt_no' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: result_tkt_no core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//div[@class='linkElements']//a[@class='switch-to-lightning']") on url https://simplilearn--partialqa.lightning.force.com/lightning/page/home is not present [32mINFO [0m setup:test_help&support.py:407 Agent is Offline [32mINFO [0m setup:test_help&support.py:418 Support ticket raised successfully [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//div[@class='linkElements']//a[@class='switch-to-lightning']") on url https://simplilearn--partialqa.lightning.force.com/lightning/page/home is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//ul[@class='tabBarItems slds-grid']//li") on url https://simplilearn--partialqa.lightning.force.com/lightning/page/home is not present [33mWARNING [0m setup:page_factory.py:57 the locator result_tkt_no on url https://simplilearn--partialqa.lightning.force.com/one/one.app#eyJjb21wb25lbnREZWYiOiJmb3JjZVNlYXJjaDpzZWFyY2hQYWdlRGVza3RvcCIsImF0dHJpYnV0ZXMiOnsidGVybSI6IjAxMjI4NTQ0Iiwic2NvcGVNYXAiOnsidHlwZSI6IlRPUF9SRVNVTFRTIn0sImNvbnRleHQiOnsiRklMVEVSUyI6e30sInNlYXJjaFNvdXJjZSI6IkFTU0lTVEFOVF9ESUFMT0ciLCJkaXNhYmxlSW50ZW50UXVlcnkiOmZhbHNlLCJkaXNhYmxlU3BlbGxDb3JyZWN0aW9uIjpmYWxzZSwicGVybXNBbmRQcmVmcyI6eyJTZWFyY2hVaS5mZWVkYmFja0NvbXBvbmVudEVuYWJsZWQiOmZhbHNlLCJPcmdQcmVmZXJlbmNlcy5DaGF0dGVyRW5hYmxlZCI6dHJ1ZSwiU2VhcmNoLmNyb3NzT2JqZWN0c0F1dG9TdWdnZXN0RW5hYmxlZCI6dHJ1ZSwiT3JnUHJlZmVyZW5jZXMuRWluc3RlaW5TZWFyY2hOYXR1cmFsTGFuZ3VhZ2VFbmFibGVkIjp0cnVlLCJTZWFyY2hVaS5zZWFyY2hVSUludGVyYWN0aW9uTG9nZ2luZ0VuYWJsZWQiOmZhbHNlLCJNeVNlYXJjaC51c2VyQ2FuSGF2ZU15U2VhcmNoQmVzdFJlc3VsdCI6dHJ1ZX0sInNlYXJjaERpYWxvZ1Nlc3Npb25JZCI6ImQ2NTAzZjM5LThjNmEtZDU4ZC01Yzk5LTQ4NzM1M2QzMmY4OCIsImRlYnVnSW5mbyI6eyJhcHBOYW1lIjoiTGlnaHRuaW5nU2VydmljZSIsImFwcFR5cGUiOiJDb25zb2xlIiwiYXBwTmFtZXNwYWNlIjoic3RhbmRhcmQiLCJsb2NhdGlvbiI6ImhvbWU6bGFuZGluZyJ9fSwiZ3JvdXBJZCI6IkRFRkFVTFQifSwic3RhdGUiOnt9fQ%3D%3D is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_connect_agent_for_B2C_selected_PG_user_if_agent_available | 450.71 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231666BA9D0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlas-sahana-test1@yopmail.com', 'issue_text': 'Video progress & play issue ...Learning - Progress, Videos, Material Profile', 'lightning_salesforce_url': 'lightning.force.com/lightning/page/', ...} @pytest.mark.test_details("SLUB-T17838","High","Help&Support","Om") def test_connect_agent_for_B2C_selected_PG_user_if_agent_available(self, initialize_pages, testdata): ''' Objective: If the user is B2C Selected pg user, clicks on help and support, if agent is available it should connect to an agent Step 1: Login to paperclip as b2c selected pg user, click on help and support Step 2: Click on chat with us option Step 3: Login to salesforce, click on omnichannel, make agent online Step 4: Switch to Docker window, clicks on help and support, Submit category, course and sub category in aarya Step 5: Login to salesforce, search the ticket number in search box ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.help_btn.click_button() time.sleep(20) self.pg_hns_user.chat_with_us_btn.click_button() time.sleep(5) assert selenium_helper.is_element_present(self.pg_hns_user.locators['chat_textbox_btn'][0], 50) time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) # Logout from LMS user lms_login_helper.logout() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to Salesforce and login with valid credentials salesforce_login_helper.sf_login() if selenium_helper.is_element_present(self.pg_hns_user.locators['switch_to_lightning_btn'][0], 20): self.pg_hns_user.switch_to_lightning_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['lightning_salesforce_url']) self.pg_hns_user.make_omniChannel_online() time.sleep(5) logging.info('Agent is Online') # Logout from Salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() else: self.pg_hns_user.make_omniChannel_online() time.sleep(5) logging.info('Agent is Online') # Logout from Salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.raise_support_ticket_for_B2C_selected_PG_user(testdata['subCategory'], testdata['issue_text']) time.sleep(10) selenium_helper.is_element_present(self.pg_hns_user.locators['tkt_no_for_selected_PG_user'][0], 20) logging.info('Support ticket raised successfully') support_tkt_no = self.pg_hns_user.tkt_no_for_selected_PG_user.get_text() tkt_value = support_tkt_no[11:19] logging.info('Current ticket no is {}'.format(tkt_value)) time.sleep(2) pytest.driver.switch_to.default_content() time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) # Logout from LMS user lms_login_helper.logout() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to Salesforce and login with valid credentials salesforce_login_helper.sf_login() if selenium_helper.is_element_present(self.pg_hns_user.locators['switch_to_lightning_btn'][0], 20): self.pg_hns_user.switch_to_lightning_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['lightning_salesforce_url']) if selenium_helper.is_element_present(self.pg_hns_user.locators['salesforce_search_history'][0], 10): search_history = self.pg_hns_user.salesforce_search_history.get_all_elements() logging.info(search_history) logging.info(len(search_history)) if len(search_history)>1: for value in range(1, len(search_history)): time.sleep(3) self.pg_hns_user.salesforce_search_history_close_btn.click_button() time.sleep(3) self.pg_hns_user.search_and_get_support_ticket(tkt_value) time.sleep(3) self.pg_hns_user.result_tkt_no.scroll_to_element() time.sleep(3) assert self.pg_hns_user.result_tkt_no.get_attribute('title') == tkt_value time.sleep(2) self.pg_hns_user.chat_transcript_btn.scroll_to_element() time.sleep(3) self.pg_hns_user.chat_transcript_btn.click_button() time.sleep(5) assert self.pg_hns_user.chat_transcript_status.get_text() == testdata['status'] time.sleep(2) # Logout from Salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() else: if selenium_helper.is_element_present(self.pg_hns_user.locators['salesforce_search_history'][0], 10): search_history = self.pg_hns_user.salesforce_search_history.get_all_elements() logging.info(search_history) logging.info(len(search_history)) if len(search_history)>1: for value in range(1, len(search_history)): time.sleep(3) self.pg_hns_user.salesforce_search_history_close_btn.click_button() time.sleep(3) self.pg_hns_user.search_and_get_support_ticket(tkt_value) time.sleep(3) > self.pg_hns_user.result_tkt_no.scroll_to_element() test\test_help&support.py:581: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.hnsuser_page.HnsUserPage object at 0x00000231666E1310>, loc = 'result_tkt_no' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: result_tkt_no core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//div[@class='linkElements']//a[@class='switch-to-lightning']") on url https://simplilearn--partialqa.lightning.force.com/lightning/page/home is not present [32mINFO [0m setup:test_help&support.py:515 Agent is Online [32mINFO [0m setup:test_help&support.py:526 Support ticket raised successfully [32mINFO [0m setup:test_help&support.py:529 Current ticket no is 01228545 [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//div[@class='linkElements']//a[@class='switch-to-lightning']") on url https://simplilearn--partialqa.lightning.force.com/lightning/page/home is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//ul[@class='tabBarItems slds-grid']//li") on url https://simplilearn--partialqa.lightning.force.com/lightning/page/home is not present [33mWARNING [0m setup:page_factory.py:57 the locator result_tkt_no on url https://simplilearn--partialqa.lightning.force.com/one/one.app#eyJjb21wb25lbnREZWYiOiJmb3JjZVNlYXJjaDpzZWFyY2hQYWdlRGVza3RvcCIsImF0dHJpYnV0ZXMiOnsidGVybSI6IjAxMjI4NTQ1Iiwic2NvcGVNYXAiOnsidHlwZSI6IlRPUF9SRVNVTFRTIn0sImNvbnRleHQiOnsiRklMVEVSUyI6e30sInNlYXJjaFNvdXJjZSI6IkFTU0lTVEFOVF9ESUFMT0ciLCJkaXNhYmxlSW50ZW50UXVlcnkiOmZhbHNlLCJkaXNhYmxlU3BlbGxDb3JyZWN0aW9uIjpmYWxzZSwicGVybXNBbmRQcmVmcyI6eyJTZWFyY2hVaS5mZWVkYmFja0NvbXBvbmVudEVuYWJsZWQiOmZhbHNlLCJPcmdQcmVmZXJlbmNlcy5DaGF0dGVyRW5hYmxlZCI6dHJ1ZSwiU2VhcmNoLmNyb3NzT2JqZWN0c0F1dG9TdWdnZXN0RW5hYmxlZCI6dHJ1ZSwiT3JnUHJlZmVyZW5jZXMuRWluc3RlaW5TZWFyY2hOYXR1cmFsTGFuZ3VhZ2VFbmFibGVkIjp0cnVlLCJTZWFyY2hVaS5zZWFyY2hVSUludGVyYWN0aW9uTG9nZ2luZ0VuYWJsZWQiOmZhbHNlLCJNeVNlYXJjaC51c2VyQ2FuSGF2ZU15U2VhcmNoQmVzdFJlc3VsdCI6dHJ1ZX0sInNlYXJjaERpYWxvZ1Nlc3Npb25JZCI6ImY5ZjMyNTM3LTRjODctYjRiNS1iODUwLWM3NzQ5YjY0NTljOCIsImRlYnVnSW5mbyI6eyJhcHBOYW1lIjoiTGlnaHRuaW5nU2VydmljZSIsImFwcFR5cGUiOiJDb25zb2xlIiwiYXBwTmFtZXNwYWNlIjoic3RhbmRhcmQiLCJsb2NhdGlvbiI6ImhvbWU6bGFuZGluZyJ9fSwiZ3JvdXBJZCI6IkRFRkFVTFQifSwic3RhdGUiOnt9fQ%3D%3D is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_connect_agent_for_non_B2C_PG_user_if_agent_available | 198.21 | |
self = <test_help&support.TestHelpAndSupport object at 0x0000023166692BB0>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlascpmdemo1@yopmail.com', 'issue_text': 'Video progress & play issue Self Learning - Progress, Videos, Material Profile', 'lightning_salesforce_url': 'lightning.force.com/lightning/page/', ...} @pytest.mark.test_details("SLUB-T17844","High","Help&Support","Om") def test_connect_agent_for_non_B2C_PG_user_if_agent_available(self, initialize_pages, testdata): ''' Objective: If the user is B2C non-pg user, it should show old HnS experience, if agent is available it should connect to agent Step 1: Login to paperclip, click on Help Step 2: Click on any article Step 3: Scroll down and Click on Article not helpful Step 4: Login to salesforce, click on omnichannel, make agent online Step 5: Switch to Docker window, Submit category, course, and subcategory Step 6: Login to salesforce, search the ticket number in search box ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.help_btn.click_button() time.sleep(20) self.pg_hns_user.articles_btn_for_non_PG_user.click_button() time.sleep(10) self.pg_hns_user.article_not_helpful_btn.scroll_to_element() time.sleep(5) self.pg_hns_user.article_not_helpful_btn.click_button() time.sleep(5) self.pg_hns_user.connect_to_aarya_btn.click_button() assert selenium_helper.is_element_present(self.pg_hns_user.locators['chat_textbox_btn'][0], 50) time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) # Logout from LMS user lms_login_helper.logout() pytest.driver.delete_all_cookies() # Navigate to Salesforce and login with valid credentials salesforce_login_helper.sf_login() if selenium_helper.is_element_present(self.pg_hns_user.locators['switch_to_lightning_btn'][0], 20): self.pg_hns_user.switch_to_lightning_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['lightning_salesforce_url']) self.pg_hns_user.make_omniChannel_online() time.sleep(5) logging.info('Agent is Online') # Logout from Salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() else: > self.pg_hns_user.make_omniChannel_online() test\test_help&support.py:642: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\hnsuser_page.py:110: in make_omniChannel_online self.omniChannel_btn.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.hnsuser_page.HnsUserPage object at 0x00000231664E2B80>, loc = 'omniChannel_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: omniChannel_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//div[@class='linkElements']//a[@class='switch-to-lightning']") on url https://simplilearn--partialqa.my.salesforce.com/_ui/identity/verification/method/EmailVerificationStartUi/e?vcsrf=I7YUPlrqILVurIR5laOaEABDPdr-WoZcZEvBht7EZRIbrHlv4fkSYnnpw0xGiKAxtZ-Q8jz9B9hvVcjZF9pI6dWlMnQUgJspmnvcNbrB_lTZEvKv2YYgZ0MQYAKZArgXugzD9KKeCKUpMeV-jpdLpScTh2c17z7fFigysNQcPB-gRMWBETnEWCy0RSLqO8uhFfpcNFUxkiQGd7vRvQ9FfFGzjPqT8auplQ33NtlHGCK0Hesz9oa8u8TfCPuJ_JO_-r86-iQyc6Ld3Fe9c7GsUOs7sndglyBS670ElaAh6aJjHpSArksH1C69ETxJ-DOlYltOMd86nOwVKQjJfmWmcUCkkuMnPqU36yhV5IUfhNLyi17Yfh_pQDS2bggyhXRMToxSUZN3Gc2iyi0IQDT0QugP2QKj84MT-oU9Ho99S4n3vGM-BWmiqaLkg4FhbjgWk_6NtX9o_SSUXVf2z6BW2sXvQPgvvJ7yrM6C1NTFe-hAJsyU3AptlYRLjare8txE-miSPXuWqMNYjGaN1BaPtvtuH1-guCe_YS9_Sze8VohSpLlpIhpYzK_rieV1pvqkMr_W3wA6QQSTFY67n_az0jKSUo2ioCRwmnvb5yLdwAvFmcRYuGP8BaC9TbCe3x1I2x9KLpOYaEKo1Xow7Bc18A8AbM71PGuZzeDVgQ54qUE%3D&vpol=ic&vflid=0&vfgrp=386047537&retURL=%2Fsecur%2Ffrontdoor.jsp%3Fallp%3D1%26cshc%3Ds000002E7hes0000000ZDA%26apv%3D1%26display%3Dpage%26ucs%3D1 is not present [33mWARNING [0m setup:page_factory.py:57 the locator omniChannel_btn on url https://simplilearn--partialqa.my.salesforce.com/_ui/identity/verification/method/EmailVerificationStartUi/e?vcsrf=I7YUPlrqILVurIR5laOaEABDPdr-WoZcZEvBht7EZRIbrHlv4fkSYnnpw0xGiKAxtZ-Q8jz9B9hvVcjZF9pI6dWlMnQUgJspmnvcNbrB_lTZEvKv2YYgZ0MQYAKZArgXugzD9KKeCKUpMeV-jpdLpScTh2c17z7fFigysNQcPB-gRMWBETnEWCy0RSLqO8uhFfpcNFUxkiQGd7vRvQ9FfFGzjPqT8auplQ33NtlHGCK0Hesz9oa8u8TfCPuJ_JO_-r86-iQyc6Ld3Fe9c7GsUOs7sndglyBS670ElaAh6aJjHpSArksH1C69ETxJ-DOlYltOMd86nOwVKQjJfmWmcUCkkuMnPqU36yhV5IUfhNLyi17Yfh_pQDS2bggyhXRMToxSUZN3Gc2iyi0IQDT0QugP2QKj84MT-oU9Ho99S4n3vGM-BWmiqaLkg4FhbjgWk_6NtX9o_SSUXVf2z6BW2sXvQPgvvJ7yrM6C1NTFe-hAJsyU3AptlYRLjare8txE-miSPXuWqMNYjGaN1BaPtvtuH1-guCe_YS9_Sze8VohSpLlpIhpYzK_rieV1pvqkMr_W3wA6QQSTFY67n_az0jKSUo2ioCRwmnvb5yLdwAvFmcRYuGP8BaC9TbCe3x1I2x9KLpOYaEKo1Xow7Bc18A8AbM71PGuZzeDVgQ54qUE%3D&vpol=ic&vflid=0&vfgrp=386047537&retURL=%2Fsecur%2Ffrontdoor.jsp%3Fallp%3D1%26cshc%3Ds000002E7hes0000000ZDA%26apv%3D1%26display%3Dpage%26ucs%3D1 is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_create_support_ticket_for_non_B2C_PG_user_if_agent_unavailable | 186.30 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231666E1580>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'atlascpmdemo1@yopmail.com', 'issue_text': 'Video progress & play issue Self Learning - Progress, Videos, Material Profile', 'lightning_salesforce_url': 'lightning.force.com/lightning/page/', ...} @pytest.mark.test_details("SLUB-T17845","High","Help&Support","Om") def test_create_support_ticket_for_non_B2C_PG_user_if_agent_unavailable(self, initialize_pages, testdata): ''' Objective: If the user is B2C non-pg user, it should show old HnS experience, if agent is unavailable it should create ticket Step 1: Login to paperclip, click on Help Step 2: Click on any article Step 3: Scroll down and Click on Article not helpful Step 4: Login to salesforce, click on omnichannel, make agent online Step 5: Switch to Docker window, Submit category, course, and subcategory Step 6: Login to salesforce, search the ticket number in search box ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.help_btn.click_button() time.sleep(15) self.pg_hns_user.articles_btn_for_non_PG_user.click_button() time.sleep(10) self.pg_hns_user.article_not_helpful_btn.scroll_to_element() time.sleep(5) self.pg_hns_user.article_not_helpful_btn.click_button() time.sleep(5) self.pg_hns_user.connect_to_aarya_btn.click_button() assert selenium_helper.is_element_present(self.pg_hns_user.locators['chat_textbox_btn'][0], 50) time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) self.pg_hns_user.close_help_window_btn.click_button() time.sleep(2) # Logout from LMS user lms_login_helper.logout() time.sleep(7) pytest.driver.delete_all_cookies() # Navigate to Salesforce and login with valid credentials salesforce_login_helper.sf_login() if selenium_helper.is_element_present(self.pg_hns_user.locators['switch_to_lightning_btn'][0], 20): self.pg_hns_user.switch_to_lightning_btn.click_button() selenium_helper.wait_for_page_to_load(50, testdata['lightning_salesforce_url']) self.pg_hns_user.make_omniChannel_online() logging.info('Agent is Online') time.sleep(5) # Logout from Salesforce user salesforce_login_helper.sf_logout_user() time.sleep(7) pytest.driver.delete_all_cookies() else: > self.pg_hns_user.make_omniChannel_online() test\test_help&support.py:771: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\hnsuser_page.py:110: in make_omniChannel_online self.omniChannel_btn.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.hnsuser_page.HnsUserPage object at 0x00000231664DAB50>, loc = 'omniChannel_btn' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: omniChannel_btn core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//div[@class='linkElements']//a[@class='switch-to-lightning']") on url https://simplilearn--partialqa.my.salesforce.com/_ui/identity/verification/method/EmailVerificationStartUi/e?vcsrf=Dfvkt-k7e7Wb11cCulbdkh9V2zNa5pM8qC-6NdepWiDOXXuJnRNCadQ2CgbB9UMu2dkht2RoB7GzdWtkMbb21EYqZoVhHCBvEKquKgTn5zmQ8YVFahBJyIzgqNI-jOdV3mKbG63PhjXvgew54sVu2IKXNygE2Wz8AnisRzz7IuhDRBMg8TGbbCLQqQy1BEkOw_PpzAPZvEbOCzO9qc1tB0j6nlN06PpkdvhUKwWhltYXIwweti3SSbijNCP_kWduIbbIF6eHvQFTEtzGtk2N4MIoM0H6ZfJii-oNURCP7_qlQRSc2yoeuhr-ybTIrWNP5UnPRMiLXC1xsIsAHNKSw4053mPClP8ylaPhLpR6_St3nu1dnD5JJ-3jO8VD-4Ou66BxcaFC3o06mQC9Fs4i-Ly9v1mr6X-EJHbUpNIlN5Hyn_Jth0XbEB0_ODcy5Ue1mmwW5X4jx7S5sM1Q3scv36LTYBqMeZF8igekW8k5UbY8Zt_qAKvjhSq7gK_DM4-vljccMnIahY1GJG22ul0MZT7fBccnEBnBnn752wsXbDvFjvJAWWI7S0eCLaxufXWflaidZqmJuAFjrp99zeDklHVtXAPNJlO_619IztMOfpfC9y-p0DbShFxa1PPRgyqhg5VLryEYq9R8xZpNYepqzI-hGilWz82Qw5pByIxK_iI%3D&vpol=ic&vflid=0&vfgrp=164776819&retURL=%2Fsecur%2Ffrontdoor.jsp%3Fallp%3D1%26cshc%3Ds000002E7hes0000000ZDA%26apv%3D1%26display%3Dpage%26ucs%3D1 is not present [33mWARNING [0m setup:page_factory.py:57 the locator omniChannel_btn on url https://simplilearn--partialqa.my.salesforce.com/_ui/identity/verification/method/EmailVerificationStartUi/e?vcsrf=Dfvkt-k7e7Wb11cCulbdkh9V2zNa5pM8qC-6NdepWiDOXXuJnRNCadQ2CgbB9UMu2dkht2RoB7GzdWtkMbb21EYqZoVhHCBvEKquKgTn5zmQ8YVFahBJyIzgqNI-jOdV3mKbG63PhjXvgew54sVu2IKXNygE2Wz8AnisRzz7IuhDRBMg8TGbbCLQqQy1BEkOw_PpzAPZvEbOCzO9qc1tB0j6nlN06PpkdvhUKwWhltYXIwweti3SSbijNCP_kWduIbbIF6eHvQFTEtzGtk2N4MIoM0H6ZfJii-oNURCP7_qlQRSc2yoeuhr-ybTIrWNP5UnPRMiLXC1xsIsAHNKSw4053mPClP8ylaPhLpR6_St3nu1dnD5JJ-3jO8VD-4Ou66BxcaFC3o06mQC9Fs4i-Ly9v1mr6X-EJHbUpNIlN5Hyn_Jth0XbEB0_ODcy5Ue1mmwW5X4jx7S5sM1Q3scv36LTYBqMeZF8igekW8k5UbY8Zt_qAKvjhSq7gK_DM4-vljccMnIahY1GJG22ul0MZT7fBccnEBnBnn752wsXbDvFjvJAWWI7S0eCLaxufXWflaidZqmJuAFjrp99zeDklHVtXAPNJlO_619IztMOfpfC9y-p0DbShFxa1PPRgyqhg5VLryEYq9R8xZpNYepqzI-hGilWz82Qw5pByIxK_iI%3D&vpol=ic&vflid=0&vfgrp=164776819&retURL=%2Fsecur%2Ffrontdoor.jsp%3Fallp%3D1%26cshc%3Ds000002E7hes0000000ZDA%26apv%3D1%26display%3Dpage%26ucs%3D1 is not present | |||
Failed | test_help&support.py::TestHelpAndSupport::test_mandatory_fields_to_raise_tickets_for_B2C_only_PG_user | 30.13 | |
self = <test_help&support.TestHelpAndSupport object at 0x00000231665B7B80>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'hnsupportt@yopmail.com', 'issue_text': 'Video progress & play issue Self Learning - Progress, Videos, Material Profile', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T17848","Normal","Help&Support","Om") def test_mandatory_fields_to_raise_tickets_for_B2C_only_PG_user(self, initialize_pages, testdata): ''' Objective: If the B2C only pg user, interacts with article and then navigates to get assistance page, course and subcategory fields should be auto filled. Step 1: Login to paperclip, open help Step 2: Click on category, article and navigate to get assistance page ''' # Navigate to lms and login with valid credentials lms_login_helper.Hns_user_login(testdata['email'], testdata['password']) selenium_helper.wait_for_page_to_load(50, testdata['dashboard_url']) self.pg_hns_user.help_btn.click_button() > self.pg_hns_user.filledUp_mandatory_fields_to_verify_submit_btn_enable(testdata["issue_text"]) test\test_help&support.py:909: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\hnsuser_page.py:122: in filledUp_mandatory_fields_to_verify_submit_btn_enable self.get_assistant_btn.click_button() core\page_factory.py:195: in click_button self.click() c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webelement.py:80: in click self._execute(Command.CLICK_ELEMENT) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webelement.py:633: in _execute return self._parent.execute(command, params) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 404, 'value': '{"value":{"error":"stale element reference","message":"stale element reference: element is n...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: element is not attached to the page document E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: StaleElementReferenceException | |||
Failed | test_home.py::TestHome::test_search_functionality | 2.26 | |
self = <test_home.TestHome object at 0x000002316666B790>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'input_search': 'Lean Management', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Home","Pavan") def test_search_functionality(self,initialize_pages,testdata): ''' Objective : To verify search_functionality . Step1: Navigate to LMS Login url and login with valid credentials . Step2: Enter Elearning Name in Search Box Step3: Identify all elearning names present on Dashboard and find Total Number of elearnings found after Search Step4: Validate Actual and expected results Step5: Logout from the application ''' #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_home.py:33: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_home.py::TestHome::test_search_functionality_with_invalid_elearning | 0.07 | |
self = <test_home.TestHome object at 0x00000231668E0FD0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'input_search': 'Automation Testing Elearning', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Home","Pavan") def test_search_functionality_with_invalid_elearning(self,initialize_pages,testdata): ''' Objective : To verify search_functionality with invalid / not assigned elearning. Step1: Navigate to LMS Login url and login with valid credentials . Step2: Enter Invalid / Not Assigned Elearning Name in Search Box Step3: Identify all elearning names present on Dashboard and find Total Number of elearnings found after Search Step4: Validate Actual and expected results Step5: Logout from the application ''' try: #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_home.py:72: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_home.py::TestHome::test_sort_by_a_z | 1.96 | |
self = <test_home.TestHome object at 0x00000231669BFFD0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Home","Pavan") def test_sort_by_a_z(self,initialize_pages,testdata): ''' Objective : To verify sorting elearing from A-Z Step1: Navigate to LMS Login url and login with valid credentials . Step2: Before Sorting identify all elearning names present on Dashboard and log all elearnings Step3: Click on Sort by drop down and then click on A-Z link Step4: After Sorting identify all elearning names present on Dashboard and log all elearnings Step5: Validate count of elearnings before and after sort Step6: Logout from the application ''' #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_home.py:115: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_home.py::TestHome::test_sort_by_z_a | 0.11 | |
self = <test_home.TestHome object at 0x000002316670F880>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Home","Pavan") def test_sort_by_z_a(self,initialize_pages,testdata): ''' Objective : To verify sorting elearing from Z-A Step1: Navigate to LMS Login url and login with valid credentials . Step2: Before Sorting identify all elearning names present on Dashboard and log all elearnings Step3: Click on Sort by drop down and then click on Z-A link Step4: After Sorting identify all elearning names present on Dashboard and log all elearnings Step5: Validate count of elearnings before and after sort Step6: Logout from the application ''' #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_home.py:158: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_home.py::TestHome::test_sort_by_progress | 1.95 | |
self = <test_home.TestHome object at 0x00000231668A3460>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Home","Pavan") def test_sort_by_progress(self,initialize_pages,testdata): ''' Objective : To verify sorting elearing by CourseProgress Step1: Navigate to LMS Login url and login with valid credentials . Step2: Before Sorting identify course progress all elearning present on Dashboard and log progress of all elearnings Step3: Click on Sort by drop down and then click on Progress link Step4: After Sorting identify course progress all elearning present on Dashboard and log progress of all elearnings Step5: Validate count of elearnings before and after sort Step6: Logout from the application ''' #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_home.py:201: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_home.py::TestHome::test_sort_by_recent | 0.11 | |
self = <test_home.TestHome object at 0x00000231669821C0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Home","Pavan") def test_sort_by_recent(self,initialize_pages,testdata): ''' Objective : To verify sorting elearing by Recent Step1: Navigate to LMS Login url and login with valid credentials . Step2: Before Sorting identify all elearning names present on Dashboard and log all elearnings Step3: Click on Sort by drop down and then click on Recent link Step4: After Sorting identify all elearning names present on Dashboard and log all elearnings Step5: Validate count of elearnings before and after sort Step6: Logout from the application ''' #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_home.py:244: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_limited_access.py::TestLimitedAccess::test_unable_update | 1.91 | |
self = <test_limited_access.TestLimitedAccess object at 0x000002316681D550>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","limited access","Himanshu") def test_unable_update(self,initialize_pages,testdata): ''' Objective : To verify the if the course is limited access user is unable to update it #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses for which update is avalible #STEP 4: if update avalible for that course click on update #STEP 5: check user is unable to update it ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_limited_access.py:45: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_limited_access.py::TestLimitedAccess::test_lab_present | 0.12 | |
self = <test_limited_access.TestLimitedAccess object at 0x0000023166997CD0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'expired_lab_message': 'Practice lab Access Expired', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","limited access","Himanshu") def test_lab_present(self,initialize_pages,testdata): ''' Objective : To verify lab is present #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses for which lab is avalible #STEP 4: if lab avalible for that course open the course #STEP 5: check the lab is present ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_limited_access.py:96: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_limited_access.py::TestLimitedAccess::test_lab_expired | 1.96 | |
self = <test_limited_access.TestLimitedAccess object at 0x0000023166814FD0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'expired_lab_message': 'Practice lab Access Expired', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","limited access","Himanshu") def test_lab_expired(self,initialize_pages,testdata): ''' Objective : To verify the if the course is limited access the lab is expired #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses for which update is avalible #STEP 4: if update avalible for that course click on update #STEP 5: go to the course #STEP 6: click on lab #STEP 7: check the lab is expired ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_limited_access.py:154: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_limited_access.py::TestLimitedAccess::test_assessment_expired | 0.15 | |
self = <test_limited_access.TestLimitedAccess object at 0x00000231669D4F40>, initialize_pages = None testdata = {'assessment_url': '/courses/2810/Big-Data-Hadoop-and-Spark-Developer1234', 'email': 'BQnewtest1@yopmail.com', 'expired_assessment_message': 'Assessment Access Expired', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T1432","high","limited access","Himanshu") def test_assessment_expired(self,initialize_pages,testdata): ''' Objective : To verify the if the course is limited access the assessment is expired #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: go to the course #STEP 3: click on lab #STEP 4: check the lab is expired ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_limited_access.py:217: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_limited_access.py::TestLimitedAccess::test_certificate_unlock_logo | 1.94 | |
self = <test_limited_access.TestLimitedAccess object at 0x00000231668D1CD0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","limited access","Himanshu") def test_certificate_unlock_logo(self,initialize_pages,testdata): ''' Objective : To verify the if the use is able to get certificate #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: click on course for which the certificate is unlock #STEP 3: check the certificate is peresent ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_limited_access.py:251: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_limited_access.py::TestLimitedAccess::test_notes_avaliable | 0.11 | |
self = <test_limited_access.TestLimitedAccess object at 0x00000231668C5280>, initialize_pages = None testdata = {'description_message': 'add description', 'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T1432","high","limited access","Himanshu") def test_notes_avaliable(self,initialize_pages,testdata): ''' Objective : To verify the if the course is limited access user is able to access notes #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses for which limited access is present #STEP 4: go to the course #STEP 5: click on notes #STEP 6: add note #STEP 7: check the note is accessable ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_limited_access.py:290: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_limited_access.py::TestLimitedAccess::test_access_selflearning | 1.80 | |
self = <test_limited_access.TestLimitedAccess object at 0x0000023166A1DCA0>, initialize_pages = None testdata = {'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","limited access","Himanshu") def test_access_selflearning(self,initialize_pages,testdata): ''' Objective : To verify the if the course is limited access user is able to access self learning video #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: find the course with limited access #STEP 4: find the limited access course found the loop is executed #STEP 5: go to the course #STEP 6: chech the self learning video is avalible ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_limited_access.py:352: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_lms_login.py::TestLogin::test_invalid_credentials | 0.28 | |
self = <test_lms_login.TestLogin object at 0x0000023166B449D0>, initialize_pages = None testdata = {'errmsg_invalid_cred': 'The email or password you have entered is invalid.', 'password': 'Simpli@1234'} @pytest.mark.test_details("SLUB-T1432","high","Login","Pavan") def test_invalid_credentials(self,initialize_pages,testdata): ''' Objective : To verify login with invalid credentials . Step1: Generate random email and navigate to lms Login url and login with random email . Step2: Verify error message and refresh the page. ''' #STEP1: Generate random email and navigate to lms Login url and login with invalid credentials email = utils.generate_random_email() > lms_login_helper.login(email,testdata['password']) test\test_lms_login.py:34: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_lms_login.py::TestLogin::test_valid_credentials | 1.77 | |
self = <test_lms_login.TestLogin object at 0x0000023166868760>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Login","Pavan") def test_valid_credentials(self,initialize_pages,testdata): ''' Objective : To verify login with invalid credentials . Step1: Navigate to LMS Login url and login with valid credentials . Step2: Verify user redirected to home page after logging in . ''' #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_lms_login.py:54: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_lms_login.py::TestLogin::test_logout | 0.35 | |
self = <test_lms_login.TestLogin object at 0x0000023166933D60>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Login","Harika") def test_logout(self,initialize_pages,testdata): ''' Objective : To verify logout . Step1: Navigate to LMS Login url and login with valid credentials . Step2: Verify user redirected to home page after logging in and verify logout functionality. ''' #Step1: Navigate to LMS Login url and login with valid credentials . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_lms_login.py:73: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_lms_login.py::TestLogin::test_multiaccount_feature | 1.71 | |
self = <test_lms_login.TestLogin object at 0x0000023166A648E0>, initialize_pages = None testdata = {'account': ' enterprise.lms.simplilearn.com ', 'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Login","Pavan") def test_multiaccount_feature(self,initialize_pages,testdata): ''' Objective : To verify multiaccount_feature . Step1: Navigate to LMS Login url and login with valid credentials with any available account. Step2: Verify user redirected to home page after logging in and verify multiaccount feature. ''' #Step1: Navigate to LMS Login url and login with valid credentials with any available account. > lms_login_helper.login(testdata['email'],testdata['password']) test\test_lms_login.py:91: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_lms_login.py::TestLogin::test_linkedin_invalid_credentials | 18.38 | |
self = <test_lms_login.TestLogin object at 0x0000023166B24520>, initialize_pages = None testdata = {'current_url': '/checkpoint/challenge/', 'errmsg_invalid_cred': 'That’s not the right password.', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Login","Himanshu") def test_linkedin_invalid_credentials(self,initialize_pages,testdata): ''' Objective : User should not be able to login with incorrect credentials through LinkedIn Step 1: click on login with linkdein Step 2: enter details and login Step 3: Verify error message and refresh the page. ''' #Step 1: click on login with linkdein pytest.driver.get(pytest.config['lms_prod_url']) time.sleep(10) > self.pg_login.btn_linkedin.click_button() test\test_lms_login.py:119: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.login_page.LoginPage object at 0x0000023166B20BB0>, loc = 'btn_linkedin' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: btn_linkedin core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator btn_linkedin on url https://accounts.simplilearn.com/user/profile is not present | |||
Failed | test_notes.py::TestNotes::test_notes_save | 2.25 | |
self = <test_notes.TestNotes object at 0x0000023166B20BE0>, initialize_pages = None testdata = {'description_message': 'add description', 'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'label_message': 'add label', ...} @pytest.mark.test_details("SLUB-T1432","high","Notes","Himanshu") def test_notes_save(self,initialize_pages,testdata): ''' Objective : Create new notes and same should be saved in My notes of loggedin user . Step1: Navigate to LMS Login url and login with valid credentials Step3: Click on Course tab . Step4: Click on First course Step5: wait to load elearning page Step6: click on notes step7: add note Step8: check wheather the notes added or not ''' #Step1: Navigate to LMS Login url and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_notes.py:43: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_notes.py::TestNotes::test_delete_note | 0.10 | |
self = <test_notes.TestNotes object at 0x0000023166A6EF40>, initialize_pages = None testdata = {'description_message': 'add description', 'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'label_message': 'add label', ...} @pytest.mark.test_details("SLUB-T1432","high","Notes","Himanshu") def test_delete_note(self,initialize_pages,testdata): ''' Objective : Delete functionality of notes saved in My notes Step1: Navigate to LMS Login url and login with valid credentials Step3: Click on Course tab . Step4: Click on First course Step5: wait to load elearning page Step6: click on notes Step7: make note Step8: go to all course note Step9: click on delete button Step 10 : check wheather the alert pop up come ''' #Step1: Navigate to LMS Login url and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_notes.py:93: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_notes.py::TestNotes::test_edit_note | 1.99 | |
self = <test_notes.TestNotes object at 0x0000023166AC6E20>, initialize_pages = None testdata = {'description_message': 'add description', 'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'label_message': 'add label', ...} @pytest.mark.test_details("SLUB-T1432","high","Notes","Himanshu") def test_edit_note(self,initialize_pages,testdata): ''' Objective : Notes saved under My Notes should be editable Step1: Navigate to LMS Login url and login with valid credentials Step3: Click on Course tab . Step4: Click on First course Step5: wait to load elearning page Step6: click on notes Step7: make note Step8: go to all the notes in course Step9: click on edit button Step10: click of description to check it loaded or not Step11: check can we make save it ''' #Step1: Navigate to LMS Login url and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_notes.py:156: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_notes.py::TestNotes::test_validation_note | 0.09 | |
self = <test_notes.TestNotes object at 0x0000023166A052B0>, initialize_pages = None testdata = {'description_message': '', 'elearningpage_url': '/courses', 'email': 'BQnewtest1@yopmail.com', 'label_message': '', ...} @pytest.mark.test_details("SLUB-T1432","high","Notes","Himanshu") def test_validation_note(self,initialize_pages,testdata): ''' Objective : Validation Check for Notes functionality Step1: Navigate to LMS Login url and login with valid credentials Step3: Click on Course tab . Step4: Click on First course Step5: wait to load elearning page Step6: click on notes Step7: add label empty label Step8: add description empty description step9: check wheather the submit buttom is disable ''' #Step1: Navigate to LMS Login url and login with valid credentials > lms_login_helper.login(testdata['email'],testdata['password']) test\test_notes.py:216: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_verify_onboarding_gif_for_cohort_master_new_learner | 2.17 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166A7FE50>, initialize_pages = None testdata = {'access_days': '100', 'admin_email': 'admin@simplilearn.com', 'bundle_id': '163', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18391,T18386,T18388,T18397","high","Onboarding Gif","Pradeep") def test_verify_onboarding_gif_for_cohort_master_new_learner(self,initialize_pages,testdata): ''' Objective : to verify all scenario of onboarding Gif for cohort master, new leraner Step 01: Create new learner Step 02: assign cohort master program Step 03: login learner and fill obb Step 04: verify Gif screen ''' #Step 01: Create new learner > email_id = TestOnboardingGif.create_newUser(self,testdata) test\test_onboarding_gif.py:90: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_onboarding_gif.py:42: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_verify_onboarding_gif_for_university_master_new_learner | 0.14 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166A238E0>, initialize_pages = None testdata = {'access_days': '100', 'admin_email': 'admin@simplilearn.com', 'bundle_id': '156', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18385,T18386,T18388,T18392,T18397","high","Onboarding Gif","Pradeep") def test_verify_onboarding_gif_for_university_master_new_learner(self,initialize_pages,testdata): ''' Objective : to verify all scenario of onboarding Gif for university master, new leraner Step 01: Create new learner Step 02: assign university master program Step 03: login learner and fill obb Step 04: verify Gif screen ''' #Step 01: Create new learner > email_id = TestOnboardingGif.create_newUser(self,testdata) test\test_onboarding_gif.py:152: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_onboarding_gif.py:42: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_verify_onboarding_gif_for_classic_master_new_learner | 1.91 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166B79B20>, initialize_pages = None testdata = {'access_days': '100', 'admin_email': 'admin@simplilearn.com', 'bundle_id': '67', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18393,T18386,T18388,T18397","high","Onboarding Gif","Pradeep") def test_verify_onboarding_gif_for_classic_master_new_learner(self,initialize_pages,testdata): ''' Objective : to verify all scenario of onboarding Gif for classic master, new leraner Step 01: Create new learner Step 02: assign classin master program Step 03: login learner and fill obb Step 04: verify Gif screen ''' #Step 01: Create new learner > email_id = TestOnboardingGif.create_newUser(self,testdata) test\test_onboarding_gif.py:214: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_onboarding_gif.py:42: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_verify_onboarding_gif_for_skillup_new_learner | 2.19 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166BEB940>, initialize_pages = None testdata = {'admin_email': 'admin@simplilearn.com', 'api_body': {'Source': 'website', 'duration': 90, 'email': '<user_email>', 'o...um', ...}, 'api_url': '/apachedev/git/paperclip/public/api/internal/assign-course', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18390","high","Onboarding Gif","Pradeep") def test_verify_onboarding_gif_for_skillup_new_learner(self,initialize_pages,testdata): ''' Objective : to verify all scenario of onboarding Gif for skill up new leraner Step 01: Create new learner Step 02: assign skillup program Step 03: login learner and fill obb Step 04: verify Gif screen ''' #Step 01: Create new learner > email_id = TestOnboardingGif.create_newUser(self,testdata) test\test_onboarding_gif.py:276: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_onboarding_gif.py:42: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_OnboardingGIF_OldLearner_NewProgramAssignment1_VerifyGIF | 0.00 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166D10CD0>, initialize_pages = None testdata = {'access_days': '100', 'admin_email': 'admin@simplilearn.com', 'bundle_id': '156', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18394","high","Onboarding Gif","Pradeep") def test_OnboardingGIF_OldLearner_NewProgramAssignment1_VerifyGIF(self,initialize_pages,testdata): ''' Objective : to verify all scenario of onboarding Gif for university master, existing leraner Step 01: get existing learner Step 02: assign university master program Step 03: login learner and fill obb Step 04: verify Gif screen ''' > email_id = cohort_master_learner[0] E IndexError: list index out of range test\test_onboarding_gif.py:337: IndexError | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_OnboardingGIF_OldLearner_MultiplePurchase_VerifyGIF | 0.00 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166E01AF0>, initialize_pages = None testdata = {'access_days': '100', 'admin_email': 'admin@simplilearn.com', 'bundle_id_classic': '67', 'bundle_id_cohort': '163', ...} @pytest.mark.test_details("SLUB-T18395","high","Onboarding Gif","Pradeep") def test_OnboardingGIF_OldLearner_MultiplePurchase_VerifyGIF(self,initialize_pages,testdata): ''' Objective : to verify all scenario of onboarding Gif for university master, existing leraner Step 01: get existing learner Step 02: assign umultiple program Step 03: login learner and fill obb Step 04: verify Gif screen ''' > email_id = university_master_learner[0] E IndexError: list index out of range test\test_onboarding_gif.py:377: IndexError | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_OnboardingGIF_Newlearner_VerifyGIF_ClosingTab_with_webengage | 2.17 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166DE3C10>, initialize_pages = None testdata = {'access_days': '100', 'admin_email': 'admin@simplilearn.com', 'bundle_id': '163', 'dashboard_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T18389,T18398,T18399","high","Onboarding Gif","Pradeep") def test_OnboardingGIF_Newlearner_VerifyGIF_ClosingTab_with_webengage(self,initialize_pages,testdata): ''' Objective : This test is to verify that all the four GIFs are displayed correctly to the learners and close the tab and try to open the LMS browser and observe the GIF Step 01: Create new learner Step 02: assign classin master program Step 03: login learner and fill obb Step 04: verify Gif screen ''' #Step 01: Create new learner > email_id = TestOnboardingGif.create_newUser(self,testdata) test\test_onboarding_gif.py:427: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ test\test_onboarding_gif.py:42: in create_newUser pytest.driver.get(pytest.config['new_url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_onboarding_gif.py::TestOnboardingGif::test_verify_onboarding_gif_for_classic_master_new_B2B_learner | 2.22 | |
self = <test_onboarding_gif.TestOnboardingGif object at 0x0000023166D82670>, initialize_pages = None testdata = {'add_url': '/add', 'b2b_admin_dashboard': '/public/affiliate', 'b2b_mp_course': 'Learning Structure bundle-1-294', 'confirm_password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T18254","high","Onboarding Gif","Pradeep") def test_verify_onboarding_gif_for_classic_master_new_B2B_learner(self,initialize_pages,testdata): ''' Objective : to verify all scenario of onboarding Gif for classic master, new leraner Step 01: Create new learner Step 02: assign classin master program Step 03: login learner and fill obb Step 04: verify Gif screen ''' name= utils.generate_random_name_regression_b2b() email_id=utils.generate_random_email_regression_b2b() #Step 01: Create new learner #Step 02: assign classin master program #Step 03: login learner and fill obb > lms_login_helper.b2b_admin_login(pytest.config['admin']['email'],pytest.config['admin']['password']) test\test_onboarding_gif.py:608: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:261: in b2b_admin_login pytest.driver.get(pytest.config['2b2_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_resetpassword.py::TestResetPassword::test_resetpassword_link_verification | 38.20 | |
self = <test_resetpassword.TestResetPassword object at 0x0000023166F6A3D0>, initialize_pages = None testdata = {'datafilepath': 'C:/lms_test_python/test/data/resetpassword.json', 'gmail': 'simplilearnautomation+20161121180900@gmail.com', 'gmail_password': 'Simpli@123', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T1432","high","Resetpassword","Yachana") def test_resetpassword_link_verification(self,initialize_pages,testdata): """ Objective: To verify reset password link is sent to email address Step1: Click on Forgot Password. Step2: Enter existing user email id click on send button . Step3: Get resetpassord link from email address. Step4: Verify restpassword link has found or not Step5: Reset new Password. """ #Step1: Click on Forgot Password text present in Simplilearn Login page. pytest.driver.get(pytest.config['lms_prod_url']) selenium_helper.is_element_present(self.pg_login.locators["lnk_forget_password"][0],20) > self.pg_login.lnk_forget_password.click_button() test\test_resetpassword.py:38: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.login_page.LoginPage object at 0x0000023166E1CAF0>, loc = 'lnk_forget_password' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: lnk_forget_password core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//label[@class='forgot-link']") on url https://accounts.simplilearn.com/user/profile is not present [33mWARNING [0m setup:page_factory.py:57 the locator lnk_forget_password on url https://accounts.simplilearn.com/user/profile is not present [33mWARNING [0m setup:page_factory.py:57 the locator lnk_forget_password on url https://accounts.simplilearn.com/user/profile is not present [33mWARNING [0m setup:page_factory.py:57 the locator lnk_forget_password on url https://accounts.simplilearn.com/user/profile is not present | |||
Failed | test_resetpassword.py::TestResetPassword::test_login_with_old_password | 2.22 | |
self = <test_resetpassword.TestResetPassword object at 0x0000023166E13700>, initialize_pages = None testdata = {'errmsg_invalid_cred': 'The email or password you have entered is invalid.', 'gmail': 'simplilearnautomation+20161121180900@gmail.com', 'old_password': 'Simpli@1234'} @pytest.mark.test_details("SLUB-T1432","high","Resetpassword","Yachana") def test_login_with_old_password(self,initialize_pages,testdata): try: #Step6: Login with old password to check password is changed > lms_login_helper.login(testdata['gmail'],testdata['old_password']) test\test_resetpassword.py:79: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ email = 'simplilearnautomation+20161121180900@gmail.com', password = 'Simpli@1234', account = 'lms.simplilearn.com' def login(email,password,account="lms.simplilearn.com"): ''' Logout() Verify user is on the Login screen and login with provided credentials verify if multi account is found. If found click on the provided account (default: lms.simplilearn.net) ''' #Step1 : Check user is logged out > pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) helper\lms_login_helper.py:25: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.chrome.webdriver.WebDriver (session="dbbd8cfe46822a9836ce63761502f3c2")> url = 'http://dockerv5.simplilearn.com:8555/apachedev/git/cloud6/public/user/login' def get(self, url): """ Loads a web page in the current browser session. """ > self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.chrome.webdriver.WebDriver (session="dbbd8cfe46822a9836ce63761502f3c2")> driver_command = 'get', params = {'url': 'http://dockerv5.simplilearn.com:8555/apachedev/git/cloud6/public/user/login'} def execute(self, driver_command, params=None): """ Sends a command to be executed by a command.CommandExecutor. :Args: - driver_command: The name of the command to execute as a string. - params: A dictionary of named parameters to send with the command. :Returns: The command's JSON response loaded into a dictionary object. """ if self.session_id is not None: if not params: params = {'sessionId': self.session_id} elif 'sessionId' not in params: params['sessionId'] = self.session_id params = self._wrap_value(params) response = self.command_executor.execute(driver_command, params) if response: > self.error_handler.check_response(response) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException During handling of the above exception, another exception occurred: self = <test_resetpassword.TestResetPassword object at 0x0000023166E13700>, initialize_pages = None testdata = {'errmsg_invalid_cred': 'The email or password you have entered is invalid.', 'gmail': 'simplilearnautomation+20161121180900@gmail.com', 'old_password': 'Simpli@1234'} @pytest.mark.test_details("SLUB-T1432","high","Resetpassword","Yachana") def test_login_with_old_password(self,initialize_pages,testdata): try: #Step6: Login with old password to check password is changed lms_login_helper.login(testdata['gmail'],testdata['old_password']) #Step7: Verify error message and refresh the page. assert testdata['errmsg_invalid_cred'] in self.pg_login.errmsg_invalid.get_text() pytest.driver.refresh() > except Exception : assert False E assert False test\test_resetpassword.py:84: AssertionError | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_TestData_EngageX_CohortCreation_MultipleSession_WithDifferentDates | 195.79 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x0000023166E250D0>, initialize_pages = None testdata = {'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', 'course_name': 'IRIS Sequential Unlock - 378', 'course_type_mp': 'mp', 'email': 'admin@simplilearn.com', ...} @pytest.mark.test_details("SLUB-T15085","high","Self Serve","pradeep") def test_TestData_EngageX_CohortCreation_MultipleSession_WithDifferentDates(self,initialize_pages,testdata): ''' Objective: EngageX Cohort Creation Multiple Session With Different Dates Step 01: Create the cohorts with 2 different classes. Step 02: Create the classes with the different sessions and different dates Step 03: Different cohort with the different classes ''' # Step 01: Create the cohorts with 2 different classes. #create 1st cohort lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['cohort_home_url']) > self.pg_cohort.click_new_cohort() test\test_selfserve_cohort.py:58: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\cohorts_page.py:26: in click_new_cohort self.mod_cohorts.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.cohorts_page.CohortsPage object at 0x0000023166E2ED60>, loc = 'mod_cohorts' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_cohorts core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//ul[@id='side-menu']//a)[8]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_cohorts on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_TestData_B2C_LearnerRegistration | 2.23 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x0000023166E20400>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', 'onboarding_url': '/oob/onboarding', ...} @pytest.mark.test_details("SLUB-T15086","high","Self Serve","pradeep") def test_TestData_B2C_LearnerRegistration(self,initialize_pages,testdata): ''' Objective: B2C_LearnerRegistration Step 01: Create a learner by doing Sign up ''' #generate random email to register a new learner and save learner email for future use userone=utils.generate_random_email_CCR() usertwo=utils.generate_random_email_CCR() with open("CCR_test_data.json",'r') as json_file: data=json.load(json_file) data['b2c_learner_one'] = userone data['b2c_learner_two'] = usertwo with open("CCR_test_data.json",'w') as json_file: json.dump(data,json_file) logging.info("register first b2c user") > pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) test\test_selfserve_cohort.py:163: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_selfserve_cohort.py:162 register first b2c user | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_TestData_LMSAdmin_MPAssignment | 0.11 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x0000023167052B50>, initialize_pages = None testdata = {'email': 'admin@simplilearn.com', 'lms_url': '/dashboard', 'password': 'Simpli@123', 'program': 'IRIS Sequential Unlock - 378', ...} @pytest.mark.test_details("SLUB-T15087","high","Self Serve","pradeep") def test_TestData_LMSAdmin_MPAssignment(self,initialize_pages,testdata): ''' Objective: LMSAdmin MPAssignment foc B2C new learner Step 01: Login in LMS Admin Step 02: Hover on Support--->Click on Assignment Step 03: Fill up the details with the requirements with the cohorts and the MP for which the cohorts have been created Step 04: Assign the bundle ''' #load require data from CCR_test_data.json json_data=json.load(open('CCR_test_data.json','r')) user_one= json_data['b2c_learner_one'] user_two= json_data['b2c_learner_two'] cohort_one=json_data['cohort1'] cohort_two=json_data['cohort2'] #assign mp program to first learner logging.info(f"assign mp program to first learner {user_one}") # Navigate to Login page. > lms_login_helper.selfserve_login(testdata['email'],testdata['password']) test\test_selfserve_cohort.py:233: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:156: in selfserve_login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_selfserve_cohort.py:231 assign mp program to first learner irissessiontest3271@yopmail.com | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_TestData_B2BEntAdmin_MPAssignment | 109.22 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x000002316719BAC0>, initialize_pages = None testdata = {'add_learner_url': '/apachedev/git/paperclip/public/affiliate/learner/add', 'b2b_learners_page': 'Learners', 'b2b_url': '/apachedev/git/paperclip/public/affiliate', 'email': 'admin@simplilearn.com', ...} @pytest.mark.test_details("SLUB-T15088","high","Self Serve","pradeep") def test_TestData_B2BEntAdmin_MPAssignment(self,initialize_pages,testdata): ''' Objective: LMSAdmin MPAssignment foc B2C new learner Step 01: Login in the Enterprise through the manager for the B2B learner MP assignment Step 02: Go to Learners List----->Click on Add Learner---->Manually---->Fill in the details--->Click on Add Learner ''' #load require data from CCR_test_data.json b2b_learner_one_email= utils.generate_learner_random_email_CCR() b2b_learner_two_email= utils.generate_learner_random_email_CCR() b2b_learner_one_name = utils.generate_random_name_CCR() b2b_learner_two_name = utils.generate_random_name_CCR() with open("CCR_test_data.json",'r') as json_file: data=json.load(json_file) data['b2b_learner_one'] = b2b_learner_one_email data['b2b_learner_two'] = b2b_learner_two_email data['b2b_learner_one_name'] = b2b_learner_one_name data['b2b_learner_two_name'] = b2b_learner_two_name with open("CCR_test_data.json",'w') as json_file: json.dump(data,json_file) json_data=json.load(open('CCR_test_data.json','r')) cohort_one=json_data['cohort1'] cohort_two=json_data['cohort2'] # Register first B2B Learner logging.info("register first b2b learner") #Step1: Navigate to xenia Login page.. lms_login_helper.xenia_login(testdata['email'],testdata['password']) # wait for xenia to load selenium_helper.wait_for_page_to_load(10,testdata['xenia_url']) time.sleep(5) logging.info("logged in to xenia successfull..!!") self.pg_assignment.b2b_view_all_enterprise() selenium_helper.wait_for_page_to_load(120,testdata['redirecton_url']) logging.info("FInsale url open successful to search for id") self.pg_assignment.b2b_login_as_manager(testdata['enterprise']) selenium_helper.wait_for_page_to_load(120,testdata['b2b_url']) self.pg_assignment.click_learners() selenium_helper.wait_for_page_to_load(120,testdata['view_learner_url']) assert (testdata['b2b_learners_page'] == self.pg_assignment.learner_page.text) logging.info("Learner page opened sucessfully") > self.pg_assignment.add_leaarner_manually() test\test_selfserve_cohort.py:304: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\assignment_page.py:83: in add_leaarner_manually self.add_learner_button.click_button() core\page_factory.py:195: in click_button self.click() c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webelement.py:80: in click self._execute(Command.CLICK_ELEMENT) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webelement.py:633: in _execute return self._parent.execute(command, params) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 400, 'value': '{"value":{"error":"element click intercepted","message":"element click intercepted: Element ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">...</button> is not clickable at point (1810, 189). Other element would receive the click: <div id="ajaxLoadDialog" class="ajax_load_dialog loader-section loader-section-top">...</div> E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: ElementClickInterceptedException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_selfserve_cohort.py:286 register first b2b learner [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_selfserve_cohort.py:292 logged in to xenia successfull..!! [32mINFO [0m setup:test_selfserve_cohort.py:296 FInsale url open successful to search for id [33mWARNING [0m setup:page_factory.py:57 the locator label_id_field on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/finsale/affiliate/manage-resellers is not present [32mINFO [0m setup:assignment_page.py:72 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_selfserve_cohort.py:303 Learner page opened sucessfully | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_TestData_B2B_LearnerRegisteration | 19.67 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x000002316706D550>, initialize_pages = None testdata = {'confirm_password': 'Simpli@123', 'name': 'TestingCCR9800', 'onboarding_url': 'dashboard/oob/onboarding', 'password': 'Simpli@123', ...} @pytest.mark.test_details("SLUB-T15089","high","Self Serve","pradeep") def test_TestData_B2B_LearnerRegisteration(self,initialize_pages,testdata): ''' Objective: B2B_LearnerRegisteration from yopmail Step 01: After the learner is added go to the learner's mail Step 02: Click on the registration mail and copy the link and paste/open the link in new tab Step 03: Fill in the details of the learner to make the learner registered Step 04: Land up on the Learner's LMS dashboard ''' json_data=json.load(open('CCR_test_data.json','r')) b2b_learner_one_name=json_data['b2b_learner_one_name'] b2b_learner_one_email=json_data['b2b_learner_one'] b2b_learner_two_name=json_data['b2b_learner_two_name'] b2b_learner_two_email=json_data['b2b_learner_two'] logging.info("register 1st b2b learner") pytest.driver.get(testdata['yopmail_url']) self.pg_assignment.yopmail_mail_login(b2b_learner_one_email) > registration_link=self.pg_assignment.get_registration_link(b2b_learner_one_name) test\test_selfserve_cohort.py:361: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\assignment_page.py:150: in get_registration_link all_inbox=self.all_email.get_all_elements() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.assignment_page.AssignmentPage object at 0x0000023166EDBBB0>, loc = 'all_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: all_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_selfserve_cohort.py:357 register 1st b2b learner [32mINFO [0m setup:assignment_page.py:143 The email used for yopmail login is : irisb2bsessiontestCCR+asu@yopmail.com [33mWARNING [0m setup:page_factory.py:66 the locator yopmail_iframe_inbox on url https://yopmail.com/en/wm is not visible [33mWARNING [0m setup:page_factory.py:57 the locator all_email on url https://yopmail.com/en/wm is not present | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_Verify_Self_serve_cohort_change_WhenLearnerHasNoProgress_DestinationCohortSelected | 2.26 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x0000023167229220>, initialize_pages = None testdata = {'cohort_change_success_message': 'Cohort Changed Successfully', 'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', 'db_type': 'mysql', ...} @pytest.mark.test_details("SLUB-T15090","high","Self Serve","pradeep") def test_Verify_Self_serve_cohort_change_WhenLearnerHasNoProgress_DestinationCohortSelected(self,initialize_pages,testdata): ''' Objective: Verify Self-serve cohort change When Learner Has No Progress Destination Cohort Selected Step 01: Login as learner Step 02: Click on Change Cohort Step 03: From the preference page select cohort Step 04: Give reason for cohort change Step 05: Submit request Step 06: Verify successful page 1.old cohort name/2. new cohort name Step 07: Click on back to dash board page - new cohort should display Step 08: avail of cohort request should change 1 to 2 Step 09: Engaex Verification 1. Go to old cohort/2. In cohort change tab - > aprrove tab -> learner should present Step 10 Mysql Verification 1. Cohort_change_request table - active_cohort_id should be new cohort id/2. learnerprogram tablle active cohort id should new cohort id ''' #read data from CCR_test_data.json file json_data=json.load(open('CCR_test_data.json','r')) b2c_learner_one_email=json_data['b2c_learner_one'] b2c_learner_two_email=json_data['b2c_learner_two'] cohort1=json_data['cohort1'] cohort2=json_data['cohort2'] cohort1_id=json_data['cohort1_id'] cohort2_id=json_data['cohort2_id'] #Step 01: Login as learner > lms_login_helper.selfserve_login(b2c_learner_one_email,testdata['password']) test\test_selfserve_cohort.py:416: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:156: in selfserve_login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_Verify_Self_serve_cohort_filter_functionality_in_prefrence_page | 0.07 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x0000023166EDB850>, initialize_pages = None testdata = {'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', 'email': 'admin@simplilearn.com', 'hex_color': '#34439b', ...} @pytest.mark.test_details("SLUB-T15093","high","Self Serve","pradeep") def test_Verify_Self_serve_cohort_filter_functionality_in_prefrence_page(self,initialize_pages,testdata): ''' Objective: Verify Self serve cohort filter functionality in prefrence page Step 01: Create 3 to 4 cohort of different timing Step 02: Assign bundle to learner Step 03: Login as learner and check - in preference page filter functionality is working fine ''' #read data from CCR_test_data.json file json_data=json.load(open('CCR_test_data.json','r')) b2c_learner_one_email=json_data['b2c_learner_one'] b2c_learner_two_email=json_data['b2c_learner_two'] cohort1=json_data['cohort1'] cohort2=json_data['cohort2'] #Step 01: Login as learner > lms_login_helper.selfserve_login(b2c_learner_one_email,testdata['password']) test\test_selfserve_cohort.py:525: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:156: in selfserve_login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_Verify_CCR_PreferencePage_Calendat_functionality | 1.98 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x00000231671D56A0>, initialize_pages = None testdata = {'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', 'email': 'admin@simplilearn.com', 'home_url': '/dashboard', ...} @pytest.mark.test_details("SLUB-T15094","high","Self Serve","pradeep") def test_Verify_CCR_PreferencePage_Calendat_functionality(self,initialize_pages,testdata): ''' Objective: Verify CCR PreferencePage Calender functionality Step 01: 1. Create 3, 4 cohort for bunlde Step 02: 2 Assign that bundle to learner Step 03: 3 Login as learner Step 04: click on Cohort change Step 05: In preference page - Cohort should come with respect to month selected in calendar. ''' #read data from CCR_test_data.json file json_data=json.load(open('CCR_test_data.json','r')) b2c_learner_one_email=json_data['b2c_learner_one'] b2c_learner_two_email=json_data['b2c_learner_two'] cohort1=json_data['cohort1'] cohort2=json_data['cohort2'] #Step 03: Login as learner > lms_login_helper.selfserve_login(b2c_learner_one_email,testdata['password']) test\test_selfserve_cohort.py:587: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:156: in selfserve_login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_Verify_CCR_WhenLearnerHasNoProgress_Submit_Preference | 0.03 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x000002316737B610>, initialize_pages = None testdata = {'cohort_change_success_message': 'Cohort Preference Submitted Successfully', 'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', 'db_type': 'mysql', ...} @pytest.mark.test_details("SLUB-T15091","high","Self Serve","pradeep") def test_Verify_CCR_WhenLearnerHasNoProgress_Submit_Preference(self,initialize_pages,testdata): #read data from CCR_test_data.json file json_data=json.load(open('CCR_test_data.json','r')) b2c_learner_one_email=json_data['b2c_learner_one'] b2c_learner_two_email=json_data['b2c_learner_two'] b2b_learner_one_email = json_data['b2b_learner_one'] b2b_learner_two_email = json_data['b2b_learner_two'] cohort1=json_data['cohort1'] cohort2=json_data['cohort2'] cohort1_id=json_data['cohort1_id'] cohort2_id=json_data['cohort2_id'] #Step 03: Login as learner > lms_login_helper.selfserve_login(b2c_learner_two_email,testdata['password']) test\test_selfserve_cohort.py:635: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:156: in selfserve_login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_Verify_CCR_EngageX_RejectCCR | 192.61 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x00000231671D6BE0>, initialize_pages = None testdata = {'cohort_change_status': 'Cohort Change Declined', 'cohort_change_success_message': 'Cohort Preference Submitted Succe..., 'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', ...} @pytest.mark.test_details("SLUB-T15096","high","Self Serve","pradeep") def test_Verify_CCR_EngageX_RejectCCR(self,initialize_pages,testdata): ''' Objective: Verify CCR EngageX RejectCCR Step 01: Login as learner Step 02: Click on Cohort change Step 03: Click on submit preference Step 04: On engaex got to old cohort -> change request - > reject request Step 05: Then login to learner Step 06: Verify new cohort is coming Step 07: Verify successful tag ''' #read data from CCR_test_data.json file json_data=json.load(open('CCR_test_data.json','r')) b2c_learner_one_email=json_data['b2c_learner_one'] b2c_learner_two_email=json_data['b2c_learner_two'] cohort1=json_data['cohort1'] cohort2=json_data['cohort2'] ''' #Step 03: Login as learner lms_login_helper.selfserve_login(b2c_learner_two_email,testdata['password']) selenium_helper.wait_for_page_to_load(60,testdata['home_url']) time.sleep(20) # Incase user redirected to oob form page , then need to fill the form and then continue if testdata['onboarding_url'] in pytest.driver.current_url: self.pg_onboarding.onboardfill() time.sleep(20) if selenium_helper.is_element_present(self.pg_assignment.locators["button_got_it"][0],10): self.pg_assignment.button_got_it.click_button() #Step 04: Click on Change Cohort self.pg_cohort.click_change_cohort() selenium_helper.wait_for_page_to_load(60,testdata['cohort_change_url']) #Step 05: submit preferences selected self.pg_cohort.click_show_more_cohort() logging.info("clicked on show more cohort from bottom of the page") self.pg_cohort.click_submit_preferences(testdata['reason'],testdata['cohort_change_success_message']) logging.info(f"{self.pg_cohort.cohort_change_under_review.text}") #logout as learner self.pg_assignment.btn_logout_dropdown.click_button() time.sleep(2) self.pg_assignment.btn_logout.click_button() logging.info("Logout successfully") time.sleep(10) ''' #self.pg_cohort.select_to_particular_cohort(cohort_name1) lms_login_helper.engagex_login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(120,testdata['cohort_home_url']) logging.info("logged in to engage X") > self.pg_cohort.select_to_particular_cohort(cohort2) test\test_selfserve_cohort.py:753: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\cohorts_page.py:491: in select_to_particular_cohort self.mod_cohorts.click_button() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.cohorts_page.CohortsPage object at 0x00000231673C1EB0>, loc = 'mod_cohorts' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: mod_cohorts core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_selfserve_cohort.py:752 logged in to engage X [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "(//ul[@id='side-menu']//a)[8]") on url http://dockerv2.simplilearn.com:8875/#/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator mod_cohorts on url http://dockerv2.simplilearn.com:8875/#/login is not present | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_Verify_CCR_EngageX_ApproveCCR | 2.29 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x0000023167601910>, initialize_pages = None testdata = {'cohort_change_success_message': 'Cohort Preference Submitted Successfully', 'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', 'email': 'admin@simplilearn.com', ...} @pytest.mark.test_details("SLUB-T15095","high","Self Serve","pradeep") def test_Verify_CCR_EngageX_ApproveCCR(self,initialize_pages,testdata): ''' Objective: Verify CCR EngageX ApproveCCR Step 01: Login as learner Step 02: Click on Cohort change Step 03: Click on submit preference Step 04: On engaex got to old cohort -> change request - > Approve request Step 05: Then login to learner Step 06: Verify new cohort is coming Step 07: Verify successful tag ''' #read data from CCR_test_data.json file json_data=json.load(open('CCR_test_data.json','r')) b2c_learner_one_email=json_data['b2c_learner_one'] b2c_learner_two_email=json_data['b2c_learner_two'] cohort1=json_data['cohort1'] cohort2=json_data['cohort2'] #Step 03: Login as learner > lms_login_helper.selfserve_login(b2c_learner_two_email,testdata['password']) test\test_selfserve_cohort.py:810: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:156: in selfserve_login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_selfserve_cohort.py::TestSelfServeCohort::test_Verify_Self_serve_cohort_request_exceed_case | 2.18 | |
self = <test_selfserve_cohort.TestSelfServeCohort object at 0x00000231675C5310>, initialize_pages = None testdata = {'cohort_change_failure_message': ' You have exceeded the maximum number of cohort changes ', 'cohort_change_success_m..., 'cohort_change_url': '/ss-cohort-change', 'cohort_home_url': 'http://dockerv2.simplilearn.com:8869/#/dashboard', ...} @pytest.mark.test_details("SLUB-T15097","high","Self Serve","pradeep") def test_Verify_Self_serve_cohort_request_exceed_case(self,initialize_pages,testdata): ''' Objective: Verify Self_ erve cohort request exceed case Step 01: Login as learner Step 02: Choose learner who is seeing preference page Step 03: Change cohort 2 times Step 04: 3 rd time when you will try , you will get cohort exceed message. Step 05: Verify the pop up text ''' #read data from CCR_test_data.json file json_data=json.load(open('CCR_test_data.json','r')) b2c_learner_one_email=json_data['b2c_learner_one'] b2c_learner_two_email=json_data['b2c_learner_two'] cohort1=json_data['cohort1'] cohort2=json_data['cohort2'] cohort1_id=json_data['cohort1_id'] cohort2_id=json_data['cohort2_id'] #Step 03: Login as learner > lms_login_helper.selfserve_login(b2c_learner_one_email,testdata['password']) test\test_selfserve_cohort.py:893: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:156: in selfserve_login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_signup.py::TestSignup::test_signup_existing_user | 0.16 | |
self = <test_signup.TestSignup object at 0x0000023167444D90>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'err_email_msg': 'Email address already exists, please choose a different one', 's...: {'firstname': 'Testfirstname', 'lastname': 'Testlastname', 'password': 'Simpli@123', 'phonenumber': 9090909090, ...}} @pytest.mark.test_details("SLUB-T1432","high","Signup","Pavan") def test_signup_existing_user(self,initialize_pages,testdata): ''' Objective : To verify signup functionality with invalid credentials . Step1: Generate random email and navigate to lms Login url and signup with existing email . Step2: Click on signup and verify user redirected to Signup Page STEP3: Enter all the details on Signup Page and click on Signup STEP4: Verify Error message displayed as we are doing signup with existing user and refresh the page . ''' #STEP1: Generate random email and navigate to lms Login url and signup with invalid credentials > pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) test\test_signup.py:36: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_signup.py::TestSignup::test_signup_functionality | 1.94 | |
self = <test_signup.TestSignup object at 0x0000023167442B20>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'onboarding_url': '/oob/onboarding', 'signup_url': '/register', 'user_details': {'firstname': 'Testfirstname', 'lastname': 'Testlastname', 'password': 'Simpli@123', 'phonenumber': 9090909090, ...}} @pytest.mark.test_details("SLUB-T1432","high","Signup","Pavan") def test_signup_functionality(self,initialize_pages,testdata): ''' Objective : To verify signup functionality . Step1: Generate random email and navigate to lms Login url and signup with random email . Step2: Click on signup and verify user redirected to Signup Page STEP3: Enter all the details on Signup Page and click on Signup Step4: Verify user redirected to home page after logging in Step5: Incase user redirected to oob form page , then redirect to profile page and logout ''' #STEP1: Generate random email and navigate to lms Login url and login with invalid credentials email = utils.generate_random_email() > pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) test\test_signup.py:68: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_updatecourse.py::TestUpdateCourse::test_verify_course_name | 0.10 | |
self = <test_updatecourse.TestUpdateCourse object at 0x00000231674A77F0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","updatecourse","Himanshu") def test_verify_course_name(self,initialize_pages,testdata): ''' Objective : To verify the details of course for which update is avalible #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses for which update is avalible #STEP 4: if update avalible for that course click on update #STEP 5: check it the course details are same ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_updatecourse.py:41: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_updatecourse.py::TestUpdateCourse::test_reject_update | 1.93 | |
self = <test_updatecourse.TestUpdateCourse object at 0x00000231678845E0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","updatecourse","Himanshu") def test_reject_update(self,initialize_pages,testdata): ''' Objective : user is able to reject the update #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses for which update is avalible #STEP 4: if update avalible for that course click on update #STEP 5: click on resume learning #STEP 6: find details for course after cancellation #STEP 7: verify still update is avalible ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_updatecourse.py:103: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_updatecourse.py::TestUpdateCourse::test_redirect_updatepage | 0.16 | |
self = <test_updatecourse.TestUpdateCourse object at 0x0000023167725CA0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123', 'update_url': '/elearning-update'} @pytest.mark.test_details("SLUB-T1432","high","updatecourse","Himanshu") def test_redirect_updatepage(self,initialize_pages,testdata): ''' Objective : To successful redirect to update page #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate througth all the courses for which update is avalible and full access #STEP 4: if update avalible for that course click on update #STEP 5: go to update page #STEP 6: verify redirected to update page ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_updatecourse.py:171: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_updatecourse.py::TestUpdateCourse::test_update_on_coursecard | 1.92 | |
self = <test_updatecourse.TestUpdateCourse object at 0x000002316740E4F0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123', 'update': 'Update Available'} @pytest.mark.test_details("SLUB-T1432","high","updatecourse","Himanshu") def test_update_on_coursecard(self,initialize_pages,testdata): ''' Objective : update is visible on course card #STEP 1: navigate to lms Login url and login with existing email . #STEP 2: take details of all the courses #STEP 3: iterate through all the courses and find the update avalible for #STEP 4: if we found the update avalible for #STEP 5: verify wheather the update is visible on course card ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_updatecourse.py:236: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_user_account.py::TestUserAccount::test_uneditable_email_username | 0.11 | |
self = <test_user_account.TestUserAccount object at 0x000002316770DC10>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'home_url': '/dashboard', 'password': 'Simpli@123', 'profile_url': '/profile'} @pytest.mark.test_details("SLUB-T1432","high","User account","Himanshu") def test_uneditable_email_username(self,initialize_pages,testdata): ''' Objective : To verify the email and username are uneditable #STEP 1: navigate to lms Login url and login with existing email . #Step2: Redirect user to Profile Page #Step3: verify the the username and email are uneditable ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_user_account.py:39: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_user_account.py::TestUserAccount::test_profile_verification | 1.72 | |
self = <test_user_account.TestUserAccount object at 0x000002316742AA90>, initialize_pages = None testdata = {'dashboard_url': '/dashboard', 'onboarding_url': '/oob/onboarding', 'signup_url': '/register', 'user_details': {'firstname': 'Testfirstname', 'lastname': 'Testlastname', 'password': 'Simpli@123', 'phonenumber': '9090909090', ...}} @pytest.mark.test_details("SLUB-T1432","high","User account","Himanshu") def test_profile_verification(self,initialize_pages,testdata): ''' Objective : To verify the profile . Step1: Generate random email and navigate to lms Login url and signup with random email . Step2: Click on signup and verify user redirected to Signup Page STEP3: Enter all the details on Signup Page and click on Signup Step4: Verify user redirected to home page after logging in Step5: Incase user redirected to oob form page , then redirect to profile page and logout #Step6: verify the details are correct in profile page ''' #STEP1: Generate random email and navigate to lms Login url and login with invalid credentials email = utils.generate_random_email() > pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) test\test_user_account.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_user_account.py::TestUserAccount::test_edit_profile | 0.30 | |
self = <test_user_account.TestUserAccount object at 0x0000023167675EB0>, initialize_pages = None testdata = {'email': 'BQnewtest1@yopmail.com', 'firstname': 'test', 'home_url': '/dashboard', 'lastname': 'runner', ...} @pytest.mark.test_details("SLUB-T1432","high","User account","Himanshu") def test_edit_profile(self,initialize_pages,testdata): ''' Objective : To verify details should be successful updated #STEP 1: navigate to lms Login url and login with existing email . #Step2: Redirect user to Profile Page #Step3: edit the user profile with new data #Step4: click on submit to save changes #Step5: verify the the details are updated ''' #STEP 1: navigate to lms Login url and login with existing email . > lms_login_helper.login(testdata['email'],testdata['password']) test\test_user_account.py:108: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ helper\lms_login_helper.py:25: in login pytest.driver.get(pytest.config['url'] + pytest.config['lms_login_url']) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:333: in get self.execute(Command.GET, {'url': url}) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:321: in execute self.error_handler.check_response(response) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000002316268C160> response = {'status': 500, 'value': '{"value":{"error":"unknown error","message":"unknown error: net::ERR_CONNECTION_REFUSED\\n ...\n\\tRtlGetAppContainerNamedObjectPath [0x77467A7E+286]\\n\\tRtlGetAppContainerNamedObjectPath [0x77467A4E+238]\\n"}}'} def check_response(self, response): """ Checks that a JSON response from the WebDriver does not have an error. :Args: - response - The JSON response from the WebDriver server as a dictionary object. :Raises: If the response contains an error message. """ status = response.get('status', None) if status is None or status == ErrorCode.SUCCESS: return value = None message = response.get("message", "") screen = response.get("screen", "") stacktrace = None if isinstance(status, int): value_json = response.get('value', None) if value_json and isinstance(value_json, basestring): import json try: value = json.loads(value_json) if len(value.keys()) == 1: value = value['value'] status = value.get('error', None) if status is None: status = value["status"] message = value["value"] if not isinstance(message, basestring): value = message message = message.get('message') else: message = value.get('message', None) except ValueError: pass exception_class = ErrorInResponseException if status in ErrorCode.NO_SUCH_ELEMENT: exception_class = NoSuchElementException elif status in ErrorCode.NO_SUCH_FRAME: exception_class = NoSuchFrameException elif status in ErrorCode.NO_SUCH_WINDOW: exception_class = NoSuchWindowException elif status in ErrorCode.STALE_ELEMENT_REFERENCE: exception_class = StaleElementReferenceException elif status in ErrorCode.ELEMENT_NOT_VISIBLE: exception_class = ElementNotVisibleException elif status in ErrorCode.INVALID_ELEMENT_STATE: exception_class = InvalidElementStateException elif status in ErrorCode.INVALID_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR \ or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER: exception_class = InvalidSelectorException elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE: exception_class = ElementNotSelectableException elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE: exception_class = ElementNotInteractableException elif status in ErrorCode.INVALID_COOKIE_DOMAIN: exception_class = InvalidCookieDomainException elif status in ErrorCode.UNABLE_TO_SET_COOKIE: exception_class = UnableToSetCookieException elif status in ErrorCode.TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.SCRIPT_TIMEOUT: exception_class = TimeoutException elif status in ErrorCode.UNKNOWN_ERROR: exception_class = WebDriverException elif status in ErrorCode.UNEXPECTED_ALERT_OPEN: exception_class = UnexpectedAlertPresentException elif status in ErrorCode.NO_ALERT_OPEN: exception_class = NoAlertPresentException elif status in ErrorCode.IME_NOT_AVAILABLE: exception_class = ImeNotAvailableException elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED: exception_class = ImeActivationFailedException elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS: exception_class = MoveTargetOutOfBoundsException elif status in ErrorCode.JAVASCRIPT_ERROR: exception_class = JavascriptException elif status in ErrorCode.SESSION_NOT_CREATED: exception_class = SessionNotCreatedException elif status in ErrorCode.INVALID_ARGUMENT: exception_class = InvalidArgumentException elif status in ErrorCode.NO_SUCH_COOKIE: exception_class = NoSuchCookieException elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN: exception_class = ScreenshotException elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED: exception_class = ElementClickInterceptedException elif status in ErrorCode.INSECURE_CERTIFICATE: exception_class = InsecureCertificateException elif status in ErrorCode.INVALID_COORDINATES: exception_class = InvalidCoordinatesException elif status in ErrorCode.INVALID_SESSION_ID: exception_class = InvalidSessionIdException elif status in ErrorCode.UNKNOWN_METHOD: exception_class = UnknownMethodException else: exception_class = WebDriverException if value == '' or value is None: value = response['value'] if isinstance(value, basestring): if exception_class == ErrorInResponseException: raise exception_class(response, value) raise exception_class(value) if message == "" and 'message' in value: message = value['message'] screen = None if 'screen' in value: screen = value['screen'] stacktrace = None if 'stackTrace' in value and value['stackTrace']: stacktrace = [] try: for frame in value['stackTrace']: line = self._value_or_default(frame, 'lineNumber', '') file = self._value_or_default(frame, 'fileName', '<anonymous>') if line: file = "%s:%s" % (file, line) meth = self._value_or_default(frame, 'methodName', '<anonymous>') if 'className' in frame: meth = "%s.%s" % (frame['className'], meth) msg = " at %s (%s)" msg = msg % (meth, file) stacktrace.append(msg) except TypeError: pass if exception_class == ErrorInResponseException: raise exception_class(response, message) elif exception_class == UnexpectedAlertPresentException: alert_text = None if 'data' in value: alert_text = value['data'].get('text') elif 'alert' in value: alert_text = value['alert'].get('text') raise exception_class(message, screen, stacktrace, alert_text) > raise exception_class(message, screen, stacktrace) E selenium.common.exceptions.WebDriverException: Message: unknown error: net::ERR_CONNECTION_REFUSED E (Session info: headless chrome=101.0.4951.67) c:\users\qateam\appdata\local\programs\python\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException | |||
Failed | test_verbs.py::TestVerbs::test_visit_verb | 30.07 | |
self = <test_verbs.TestVerbs object at 0x0000023167675C40>, initialize_pages = None testdata = {'db_type': 'bigquery', 'email': 'TestLearner123@yopmail.com', 'home_url': '/dashboard', 'learning_envirnoment_url': '/courses', ...} @pytest.mark.test_details("SLUB-T1432","high","Verbs","Pavan") def test_visit_verb(self,initialize_pages,testdata): ''' Objective : To verify Visit Verb . Step1: Navigate to LMS Login url and login with valid credentials . Step2: Click on any first elearning on Dashboard and verify user landed on learning envirnoment page . Step3: Refresh the page and wait for few seconds for visit verb data to be sent to bigquery . Step4: Fetch Bigquery visit verb data and log it. Step5: Click on back button and logout ''' #Step1: Navigate to LMS Login url and login with valid credentials . pytest.driver.get(pytest.config['lms_prod_url']) > self.pg_login.login(testdata['email'],testdata['password']) test\test_verbs.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ pages\login_page.py:29: in login self.edt_email.set_text(email) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.login_page.LoginPage object at 0x0000023167760370>, loc = 'edt_email' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: edt_email core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url https://accounts.simplilearn.com/user/profile is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url https://accounts.simplilearn.com/user/profile is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url https://accounts.simplilearn.com/user/profile is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url https://accounts.simplilearn.com/user/profile is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url https://accounts.simplilearn.com/user/profile is not present | |||
Failed | test_verbs.py::TestVerbs::test_class_registration_policy | 53.53 | |
self = <test_verbs.TestVerbs object at 0x00000231672D3D30>, initialize_pages = None testdata = {'email': 'TestLearner123@yopmail.com', 'home_url': '/dashboard', 'live_class_url': 'https://lms.simplilearn.com/courses/2810/Big-Data-Hadoop-and-Spark-Developer/classes/glvc', 'password': 'Simpli@123'} @pytest.mark.test_details("SLUB-T1432","high","Verbs","Pavan") def test_class_registration_policy(self,initialize_pages,testdata): ''' Objective : To verify class registration policy for Live Classes. Step1: Navigate to LMS Login url and login with valid credentials . Step2 : Navigate to Live class tab Step3 : Click on class registration policy link and click on Yes i got it button Step4: Click on back button and logout ''' #Step1: Navigate to LMS Login url and login with valid credentials . pytest.driver.get(pytest.config['lms_prod_url']) if "/profile" in pytest.driver.current_url : lms_login_helper.logout() pytest.driver.get(pytest.config['lms_prod_url']) self.pg_login.login(testdata['email'],testdata['password']) selenium_helper.wait_for_page_to_load(30,testdata['home_url']) #Step2 : Navigate to Live class tab pytest.driver.get(testdata['live_class_url']) selenium_helper.is_element_present(self.pg_liveclass.locators["lnk_policy"][0],20) #Step3 : Click on class registration policy link and click on Yes i got it button > self.pg_liveclass.lnk_policy.click_button() test\test_verbs.py:281: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <pages.liveclasses_page.LiveClassesPage object at 0x000002316785EBB0>, loc = 'lnk_policy' def __getattr__(self, loc): logging.debug(f"the current locator to be found {loc} on url {self.driver.current_url}") if loc in self.locators.keys(): error = "" for loc_pair in self.locators[loc]: loc_pair[0] = self.TYPE_OF_LOCATORS[loc_pair[0].lower()] loc_pair = tuple(loc_pair) try: element = WebDriverWait(self.driver, self.timeout).until( EC.presence_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not present") continue try: element = WebDriverWait(self.driver, self.timeout).until( EC.visibility_of_element_located(loc_pair) ) except (StaleElementReferenceException, NoSuchElementException, TimeoutException) as e: error = e logging.warning(f"the locator {loc} on url {self.driver.current_url} is not visible") #continue element = self.get_web_element(*loc_pair) element._locator = loc_pair logging.debug(f"the locator {loc} is found!") return element > raise NoSuchElementException("An exception of type " + type(error).__name__ + " occurred. With Element -: " + loc) E selenium.common.exceptions.NoSuchElementException: Message: An exception of type TimeoutException occurred. With Element -: lnk_policy core\page_factory.py:73: NoSuchElementException -------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('id', 'class-registeration-popup') on url https://lms.simplilearn.com/courses/2810/Big-Data-Hadoop-and-Spark-Developer/classes/glvc is not present [33mWARNING [0m setup:page_factory.py:57 the locator lnk_policy on url https://lms.simplilearn.com/courses/2810/Big-Data-Hadoop-and-Spark-Developer/classes/glvc is not present [33mWARNING [0m setup:page_factory.py:57 the locator lnk_policy on url https://lms.simplilearn.com/courses/2810/Big-Data-Hadoop-and-Spark-Developer/classes/glvc is not present [33mWARNING [0m setup:page_factory.py:57 the locator lnk_policy on url https://lms.simplilearn.com/courses/2810/Big-Data-Hadoop-and-Spark-Developer/classes/glvc is not present | |||
Passed | test_assessment.py::TestAssessment::test_prj_no_mandatory_sbmt | 2.22 | |
No log output captured. | |||
Passed | test_certificate.py::TestCertificate::test_admin_MPtoCertificate_CertConfigured | 0.66 | |
No log output captured. | |||
Passed | test_certificate.py::TestCertificate::test_admin_disable_programCertificate | 142.91 | |
-------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:1000 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:1007 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:1015 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:1020 In B2b page and clicked coure and path successfully [32mINFO [0m setup:test_certificate.py:1023 Certificate tab data is present [32mINFO [0m setup:test_certificate.py:1038 Disabled program certificate successfully [33mWARNING [0m setup:page_factory.py:57 the locator btn_logout on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate/enterprise-lms-preferences/index is not present | |||
Passed | test_certificate.py::TestCertificate::test_admin_enable_programCertificate | 134.69 | |
-------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:1061 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:1068 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:1078 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:1083 In B2b page and clicked coure and path successfully [32mINFO [0m setup:test_certificate.py:1086 Certificate tab data is present [32mINFO [0m setup:test_certificate.py:1098 Enabled program certificate successfully [33mWARNING [0m setup:page_factory.py:57 the locator btn_logout on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/affiliate/enterprise-lms-preferences/index is not present | |||
Passed | test_certificate.py::TestCertificate::test_CertMod_B2B_CLPCertConfigured_ProgramAssignment | 230.22 | |
-------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_email on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator edt_password on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [33mWARNING [0m setup:page_factory.py:57 the locator btn_login on url http://dockerv5.simplilearn.com:8558/apachedev/git/xenia/public/index/login is not present [32mINFO [0m setup:test_certificate.py:1739 logged in to xenia successfull..!! [32mINFO [0m setup:test_certificate.py:1747 FInsale url open successful to search for id [32mINFO [0m setup:test_certificate.py:1757 Clicked on manage login to redirect to b2b [32mINFO [0m setup:test_certificate.py:1768 Learner page opened sucessfully [32mINFO [0m setup:test_certificate.py:1780 Add_Learner_Manually page opened sucessfully [32mINFO [0m setup:test_certificate.py:1787 simplilearnautomation+toj@yopmail.com [32mINFO [0m setup:test_certificate.py:1791 Name and Email entered sucessfully [32mINFO [0m setup:test_certificate.py:1794 CLP program selected [32mINFO [0m setup:test_certificate.py:1800 Clicked ON ADD LEARNER BUTTON [32mINFO [0m setup:test_certificate.py:1807 Learner Added Sucessfully [32mINFO [0m setup:test_certificate.py:1813 manager Logged out sucessfull [32mINFO [0m setup:test_certificate.py:1820 yopmail tab opened [32mINFO [0m setup:test_certificate.py:1829 antivation link copied [32mINFO [0m setup:test_certificate.py:1835 Activation Page Opened [32mINFO [0m setup:test_certificate.py:1848 signup done with all detail [32mINFO [0m setup:test_certificate.py:1881 assertion complete, all courses present [32mINFO [0m setup:test_certificate.py:1887 Logout successfull | |||
Passed | test_certificate.py::TestCertificate::test_CertMod_B2B_ConfiguredMP_CertificationTab_LockedCourses_and_Program_UIVerification | 122.07 | |
-------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//button[@class='joyride-button']") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/dashboard is not present [32mINFO [0m setup:test_certificate.py:2244 Master's Programs is selected [32mINFO [0m setup:test_certificate.py:2247 Data Scientist-67 is Assigned [33mWARNING [0m setup:page_factory.py:57 the locator btn_goTo_program on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/dashboard is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//a[contains(text(),'Certification')]") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/program/masters/67/Data%20Scientist-67/courses is not present [32mINFO [0m setup:test_certificate.py:2260 inside Courses tab [32mINFO [0m setup:test_certificate.py:2264 Machine Learning V2in ellevtive tab [32mINFO [0m setup:test_certificate.py:2264 Data Science with Pythonin ellevtive tab [32mINFO [0m setup:test_certificate.py:2264 Deep Learning with TensorFlowin ellevtive tab [32mINFO [0m setup:test_certificate.py:2264 Data Science Capstonein ellevtive tab [32mINFO [0m setup:test_certificate.py:2271 inside Ellectives tab [32mINFO [0m setup:test_certificate.py:2275 Data Science with R in ellevtive tab [32mINFO [0m setup:test_certificate.py:2275 Adobe Soundbooth CS5 in ellevtive tab [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//a[contains(text(),'Certification')]") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/program/masters/67/Data%20Scientist-67/electives is not present [33mWARNING [0m setup:test_certificate.py:2336 Certification TAb is not Present [32mINFO [0m setup:test_certificate.py:2341 Logout successfull | |||
Passed | test_certificate.py::TestCertificate::test_CertMod_B2B_ConfiguredPGP_CertificationTab_LockedCourses_and_Program_UIVerification | 120.78 | |
-------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//button[@class='joyride-button']") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/dashboard is not present [32mINFO [0m setup:test_certificate.py:2382 PG Programs is selected [32mINFO [0m setup:test_certificate.py:2385 Post Graduate Program in Data Science-156 is Assigned [33mWARNING [0m setup:page_factory.py:57 the locator btn_goTo_program on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/dashboard is not present [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//a[contains(text(),'Certification')]") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/program/post-graduates/156/Post%20Graduate%20Program%20in%20Data%20Science-156/courses is not present [32mINFO [0m setup:test_certificate.py:2396 certification tab is not present [32mINFO [0m setup:test_certificate.py:2404 inside Courses tab [32mINFO [0m setup:test_certificate.py:2408 Big Data Hadoop and Spark Developerin ellevtive tab [32mINFO [0m setup:test_certificate.py:2408 Power BIin ellevtive tab [32mINFO [0m setup:test_certificate.py:2408 Introduction to Artificial Intelligencein ellevtive tab [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//div[@class='ng-star-inserted']//p[@class='course-title custom-course-title-theme']") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/program/post-graduates/156/Post%20Graduate%20Program%20in%20Data%20Science-156/electives is not present [33mWARNING [0m setup:test_certificate.py:2420 No Courses Present in Elective Tab [32mINFO [0m setup:test_certificate.py:2424 inside prerequisits tab [32mINFO [0m setup:test_certificate.py:2428 Adobe Acrobat XIin ellevtive tab [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//a[contains(text(),'Certification')]") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/program/post-graduates/156/Post%20Graduate%20Program%20in%20Data%20Science-156/prerequisites is not present [33mWARNING [0m setup:test_certificate.py:2495 Certification TAb is NOt Present [32mINFO [0m setup:test_certificate.py:2500 Logout successfull | |||
Passed | test_certificate.py::TestCertificate::test_CertMod_B2B_ConfiguredCLP_CertificationTab_LockedCourse_and_Program_UIVerification | 64.66 | |
-------------------------------Captured log call-------------------------------- [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//button[@class='joyride-button']") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/dashboard is not present [32mINFO [0m setup:test_certificate.py:2538 Learning Paths tab is present [32mINFO [0m setup:test_certificate.py:2541 Profile Details Check CLP course is assigned [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//a[contains(text(),'Certification')]") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/program/paths/241/Profile%20Details%20Check%20CLP/courses is not present [32mINFO [0m setup:test_certificate.py:2554 inside Courses tab [32mINFO [0m setup:test_certificate.py:2558 Big Data Hadoop and Spark Developerin ellevtive tab [32mINFO [0m setup:test_certificate.py:2567 Data Science with Pythonin ellevtive tab [1m[31mERROR [0m setup:selenium_helper.py:47 Message: [33mWARNING [0m setup:selenium_helper.py:48 the locator ('xpath', "//a[contains(text(),'Certification')]") on url http://irisashutosh.dockerv5.simplilearn.com:8558/apachedev/git/paperclip/public/program/paths/241/Profile%20Details%20Check%20CLP/courses is not present [33mWARNING [0m setup:test_certificate.py:2627 Certification Tab Is Not Present [32mINFO [0m setup:test_certificate.py:2632 Logout successfull | |||
Passed | test_changepassword.py::TestChangePassword::test_changepassword_functionality_validation_check | 2.36 | |
No log output captured. | |||
Passed | test_changepassword.py::TestChangePassword::test_changepassword_functionality | 2.18 | |
No log output captured. | |||
Passed | test_help&support.py::TestHelpAndSupport::test_course_category_fieldEmpty_for_B2C_only_PG_user | 71.10 | |
-------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_help&support.py:858 Selected Course [32mINFO [0m setup:test_help&support.py:860 Selected Sub Category | |||
Passed | test_help&support.py::TestHelpAndSupport::test_category_subCategory_filledUP_for_B2C_only_PG_user | 57.46 | |
-------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_help&support.py:887 Selected Category Certificate, Exam, Career services [32mINFO [0m setup:test_help&support.py:889 Selected Sub Category Career Assistance & Guarantee | |||
Passed | test_verbs.py::TestVerbs::test_learningtime_verb_check_for_already_watched_video | 180.29 | |
-------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_verbs.py:105 Capturing Learningtime data from Bigquery for already watched video [32mINFO [0m setup:db_helper.py:24 DB_type selected : bigquery [32mINFO [0m setup:db_connection.py:134 BigQuery connection is established [32mINFO [0m setup:db_connection.py:144 Requested Query : SELECT userEmail.s,applicationName.s,verb.s,userId.s,eventTime.s FROM [lrs-datawarehouse:lrs_testing.lrs_production_last1day] where verb.s = 'learningtime' and userEmail.s = 'TestLearner123@yopmail.com' order by eventTime.s desc limit 2 [32mINFO [0m setup:db_connection.py:140 BigQuery Connection is closed [32mINFO [0m setup:test_verbs.py:107 [Row(('TestLearner123@yopmail.com', 'lms.simplilearn.com', 'learningtime', '950698', '1653482421231'), {'userEmail_s': 0, 'applicationName_s': 1, 'verb_s': 2, 'userId_s': 3, 'eventTime_s': 4})] | |||
Passed | test_verbs.py::TestVerbs::test_videolearning_verb_check_for_already_watched_video | 129.08 | |
-------------------------------Captured log call-------------------------------- [32mINFO [0m setup:test_verbs.py:155 Capturing VideoLearning data from Bigquery for already watched video [32mINFO [0m setup:db_helper.py:24 DB_type selected : bigquery [32mINFO [0m setup:db_connection.py:134 BigQuery connection is established [32mINFO [0m setup:db_connection.py:144 Requested Query : SELECT userEmail.s,applicationName.s,verb.s,userId.s,eventTime.s FROM [lrs-datawarehouse:lrs_testing.lrs_production_last1day] where verb.s = 'videolearning' and userEmail.s = 'TestLearner123@yopmail.com' order by eventTime.s desc limit 2 [32mINFO [0m setup:db_connection.py:140 BigQuery Connection is closed [32mINFO [0m setup:test_verbs.py:157 [] | |||
Passed | test_verbs.py::TestVerbs::test_learningtime_verb_check_for_new_video | 113.52 | |
-------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:66 the locator new_video on url https://lms.simplilearn.com/courses/3808/EngageX-Final-Course-123/syllabus is not visible [32mINFO [0m setup:test_verbs.py:202 Capturing Learningtime data from Bigquery for new video [32mINFO [0m setup:db_helper.py:24 DB_type selected : bigquery [32mINFO [0m setup:db_connection.py:134 BigQuery connection is established [32mINFO [0m setup:db_connection.py:144 Requested Query : SELECT userEmail.s,applicationName.s,verb.s,userId.s,eventTime.s FROM [lrs-datawarehouse:lrs_testing.lrs_production_last1day] where verb.s = 'learningtime' and userEmail.s = 'TestLearner123@yopmail.com' order by eventTime.s desc limit 2 [32mINFO [0m setup:db_connection.py:140 BigQuery Connection is closed [32mINFO [0m setup:test_verbs.py:204 [Row(('TestLearner123@yopmail.com', 'lms.simplilearn.com', 'learningtime', '950698', '1653482666467'), {'userEmail_s': 0, 'applicationName_s': 1, 'verb_s': 2, 'userId_s': 3, 'eventTime_s': 4}), Row(('TestLearner123@yopmail.com', 'lms.simplilearn.com', 'learningtime', '950698', '1653482538061'), {'userEmail_s': 0, 'applicationName_s': 1, 'verb_s': 2, 'userId_s': 3, 'eventTime_s': 4})] | |||
Passed | test_verbs.py::TestVerbs::test_videolearning_verb_check_for_new_video | 116.24 | |
-------------------------------Captured log call-------------------------------- [33mWARNING [0m setup:page_factory.py:66 the locator new_video on url https://lms.simplilearn.com/courses/3808/EngageX-Final-Course-123/syllabus is not visible [32mINFO [0m setup:test_verbs.py:249 Capturing Videolearning data from Bigquery for new video [32mINFO [0m setup:db_helper.py:24 DB_type selected : bigquery [32mINFO [0m setup:db_connection.py:134 BigQuery connection is established [32mINFO [0m setup:db_connection.py:144 Requested Query : SELECT userEmail.s,applicationName.s,verb.s,userId.s,eventTime.s FROM [lrs-datawarehouse:lrs_testing.lrs_production_last1day] where verb.s = 'videolearning' and userEmail.s = 'TestLearner123@yopmail.com' order by eventTime.s desc limit 2 [32mINFO [0m setup:db_connection.py:140 BigQuery Connection is closed [32mINFO [0m setup:test_verbs.py:251 [] | |||
Passed | test_verbs.py::TestVerbs::test_register_verb | 76.43 | |
No log output captured. | |||
Passed | test_verbs.py::TestVerbs::test_unregister_verb | 76.65 | |
No log output captured. |