def test_2_fetch_existing_values(self): loggingFE.logger.info("extracting the data from the current page for the first time") facility_return_values = GetPutValues.getFacilityValues(self, driver=self.driver, facilityName=self.facility_name, click_xpath = self.click_xpath, pageNum = ClaimsFE.pageNum) ClaimsFE.facility_existing_values = facility_return_values[0] ClaimsFE.pageNum = facility_return_values[1] ClaimsFE.default_existing_values = GetPutValues.getDefaultValues(self, driver=self.driver, defaultXpaths=self.defaultsXpath) self.driver.save_screenshot(self.urlName + "_step_2_fetch_existing_values.jpg")
def test_8_only_default_values(self): loggingFE.logger.info("checking for the facility to get overridden with the default numbers.") facility_data = ['', '', ''] alert_facility = GetPutValues.putFacilityValues(self, driver=self.driver, facilityName=self.facility_name, facilityValues=facility_data, click_xpath = self.click_xpath, pageNum = ClaimsFE.pageNum) facility_return_values = GetPutValues.getFacilityValues(self, driver=self.driver, facilityName=self.facility_name, click_xpath = self.click_xpath, pageNum = ClaimsFE.pageNum) facility_new_values = facility_return_values[0] default_new_values = GetPutValues.getDefaultValues(self, driver=self.driver, defaultXpaths=self.defaultsXpath) self.assertEqual(facility_new_values, default_new_values) self.driver.save_screenshot(self.urlName + "_step_8_only_default_values.jpg")
def test_7_both_facility_and_default_values(self): loggingFE.logger.info("Checking if the facility values are over ridden with the default level value.") default_data = [300025, 200069, 500036] alert_default = GetPutValues.putDefaultValues(self, driver=self.driver, defaultXpaths=self.defaultsXpath, defaultValues=default_data) facility_return_values = GetPutValues.getFacilityValues(self, driver=self.driver, facilityName=self.facility_name, click_xpath = self.click_xpath, pageNum = ClaimsFE.pageNum) facility_new_values = facility_return_values[0] default_new_values = GetPutValues.getDefaultValues(self, driver=self.driver, defaultXpaths=self.defaultsXpath) self.assertNotEqual(facility_new_values, default_new_values) self.driver.save_screenshot(self.urlName + "_step_7_both_facility_and_default_values.jpg")