# -*- coding: utf-8 -*- ## # Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. # copyright # THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, # IN PART OR IN WHOLE, # WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. # # file tst_main_treatment_vitals # date 2022/feb/11 # author Papiya Mandal import names from configuration.config import * from configuration.utility import * from dialin.ui import utils from dialin.ui.hd_simulator import HDSimulator hd = HDSimulator() SYSTOLIC_PRESSSURE_120 = "120" SYSTOLIC_PRESSSURE_249 = "249" SYSTOLIC_PRESSSURE_60 = "60" SYSTOLIC_PRESSSURE_200 = "200" SYSTOLIC_PRESSSURE_175 = "175" SYSTOLIC_PRESSSURE_80 = "80" DIASTOLIC_PRESSSURE_50 = "50" DIASTOLIC_PRESSSURE_249 = "249" DIASTOLIC_PRESSSURE_60 = "60" DIASTOLIC_PRESSSURE_200 = "200" DIASTOLIC_PRESSSURE_175 = "175" DIASTOLIC_PRESSSURE_80 = "80" def open_vitals_pop_up(): """ Method to open the vitals pop up and verify 'Vitals' pop is opened """ test.startSection("Opening 'Vitals' pop up") vitals_touch_area = object.parent(waitForObject(names.o_vitals_title)) mouseClick(vitals_touch_area) test.log("Verifying the 'Vitals' pop up is displayed") if object.exists(names.o_vitals_confrim_btn): vitals_pop_up_title = waitForObject(names.o_vitals_pop_up_title) vitals_pop_up_title = vitals_pop_up_title.text.toUtf8().constData() test.compare(vitals_pop_up_title, VITALS_TITLE,"Vitals pop screen is displayed") test.endSection() def main(): utils.tstStart(__file__) start_application(AUT_NAME) hd.cmd_send_power_on_self_test_version_request() hd.cmd_set_treatment_states_data(sub_mode= 2, uf_state= 0, saline_state=0, heparin_state= 0, rinseback_state= 0, recirculate_state= 0, blood_prime_state= 0, treatment_end_state=0, treatment_stop_state= 0) utils.waitForGUI(delay_s=3) open_vitals_pop_up() test.log("Done") current_date_time = get_current_date_and_time() test.log(current_date_time)