# -*- 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_TreatmentTime # date 2020/04/10 # author Behrouz NematiPour # import names import time import denaliMessages def gotoScreenNtest_Contains_TimeSection(): mouseClick(waitForObject(names.o_treatmentHome_startTreatment)) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).visible, True) def main(): startApplication("denaliSquish") gotoScreenNtest_Contains_TimeSection() time.sleep(1) total = 60 denaliMessages.setTreatmentTime(total, 0, total) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.maximum, total) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.minimum, 0) for i in range(0,total+1): denaliMessages.setTreatmentTime(total, i, total - i) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.progressValue, i) test.compare(waitForObjectExists(names.o_treatmentStart_shape_Shape).parent.parent.parent.parent.timeTextValue, total - i) denaliMessages.setTreatmentTime(total, 0, total)