Index: shared/scripts/configuration/config.py =================================================================== diff -u -r8c3003ddde4f7fdfe95356a17136e040fa801c0d -rab639c7acff8c8444f869f2ac898a1cd241efa87 --- shared/scripts/configuration/config.py (.../config.py) (revision 8c3003ddde4f7fdfe95356a17136e040fa801c0d) +++ shared/scripts/configuration/config.py (.../config.py) (revision ab639c7acff8c8444f869f2ac898a1cd241efa87) @@ -39,6 +39,7 @@ VALID = True INVALID = False +USB_SLIDER_1 = 4.350 Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r8fe5a9ba850a3e98ba082d6bbe110cef84b072fe -rab639c7acff8c8444f869f2ac898a1cd241efa87 --- shared/scripts/configuration/utility.py (.../utility.py) (revision 8fe5a9ba850a3e98ba082d6bbe110cef84b072fe) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision ab639c7acff8c8444f869f2ac898a1cd241efa87) @@ -46,32 +46,38 @@ return False -def scroll_to_zone(zone=None, screen_object=None): +def scroll_to_zone(zone=None, screen_object=None, direction = None): """ - scroll to the numeric if object is hidden - @param zone - UI object - @param screen_object - UI object (UI Home screen = waveforms + numerics) - @return boolean true/false + scroll to the UI, if object is hidden + @param zone - object to be find out. + @param screen_object - object of the screen. + @return boolean """ counter = 0 while counter <= 100: try: counter += 1 + squish.snooze(0.5) squish.findObject(zone) squish.snooze(0.5) if check_if_object_is_within_the_container(obj=zone, container=screen_object): return True else: raise RuntimeError except RuntimeError: - ScreenObj = squish.waitForObject(screen_object) + ScreenObj = squish.findObject(screen_object) screenHeight = pyInt(ScreenObj.height) screenWidth = pyInt(ScreenObj.width) - squish.mouseWheel(ScreenObj, screenWidth-1000,screenHeight-10, 0, -50, squish.Qt.NoModifier) - - raise LookupError("zone object is not in view to the user after trying 100 times") + if direction is None: + squish.mouseWheel(ScreenObj, (screenWidth-100), + 107, 0, -(screenHeight-460), squish.Qt.NoModifier) + else: + squish.mouseWheel(ScreenObj, (screenWidth-100), + -(screenHeight-700), 0, 50, squish.Qt.NoModifier) + + raise LookupError("zone object is not in view to the user after " + \ + "trying 100 times") - def keyboard_input(key_value): names.o_keyboard_object["text"] = key_value return names.o_keyboard_object Index: shared/scripts/names.py =================================================================== diff -u -rc93470567d8adf60e6b64224c6cad7f9a2f674ac -rab639c7acff8c8444f869f2ac898a1cd241efa87 --- shared/scripts/names.py (.../names.py) (revision c93470567d8adf60e6b64224c6cad7f9a2f674ac) +++ shared/scripts/names.py (.../names.py) (revision ab639c7acff8c8444f869f2ac898a1cd241efa87) @@ -73,16 +73,28 @@ #o_service_combo_box={"checkable": False, "container": o_Overlay, "id": "_logTypeDelegate", "text":"Service", "type": "ItemDelegate", "unnamed": 1, "visible": True} o_combo_box_text={"container": o_SettingsBase_SettingsBase, "echoMode": 0, "type": "TextField", "unnamed": 1, "visible": True} + +#slider +o_sd_folder_slider = {"container": o_SettingsBase_SettingsBase, "id": "_sdcFolderView", "type": "ListView", "unnamed": 1, "visible": True} +o_usb_folder_slider={"container": o_SettingsBase_SettingsBase, "id": "_usbFolderView", "type": "ListView", "unnamed": 1, "visible": True} +o_slider_text = {"container": o_SettingsBase_SettingsBase, "text": "4.350", "type": "Text", "unnamed": 1, "visible": True} + #SD Card Information o_sd_card_text = {"container": o_SettingsBase_SettingsBase, "text": "SD-Card (MB)\nFree : 0.000\nTotal: 0.000", "type": "Label", "unnamed": 1, "visible": True} -#USB drive Information -o_usb_text = {"container": o_SettingsBase_SettingsBase, "text": "USB Drive (MB)\nFree : 0.000\nTotal: 0.000", "type": "Label", "unnamed": 1, "visible": True} -o_export_btns = {"container": o_SettingsBase_SettingsBase,"id": "_logTypeExportButton", "type": "ExportButton", "unnamed": 1, "visible": True} +o_sd_card_btn= {"container": o_SettingsBase_SettingsBase, "text": "SD", "type": "Label", "unnamed": 1, "visible": True} + #Export button +o_export_btns = {"container": o_SettingsBase_SettingsBase,"id": "_logTypeExportButton", "type": "ExportButton", "unnamed": 1, "visible": True} o_export_btn = {"container": o_export_btns, "text": "Export", "type": "Text", "unnamed": 1, "visible": True} -o_export_log_list={"container": o_SettingsBase_SettingsBase, "id": "_usbFolderView", "type": "ListView", "unnamed": 1, "visible": True} -o_export_log_file={"container": o_export_log_list, "text": "VDGPressuresData.o.csmes", "type": "Text", "unnamed": 1, "visible": True} -o_export_log_id={"container": o_export_log_list, "text": "0.010", "type": "Text", "unnamed": 1, "visible": True} + +#USB drive Information +# o_usb_text = {"container": o_SettingsBase_SettingsBase, "text": "USB Drive (MB)\nFree : 0.000\nTotal: 0.000", "type": "Label", "unnamed": 1, "visible": True} +# o_usb_before_click= {"container": o_SettingsBase_SettingsBase, "text": 0, "type": "Label", "unnamed": 1, "visible": True} +# o_usb_after_click={"container": o_SettingsBase_SettingsBase, "text": "USB", "type": "Label", "unnamed": 1, "visible": True} + +o_usb_folder_list= {"container": o_SettingsBase_SettingsBase, "id": "_usbFolderView", "type": "ListView", "unnamed": 1, "visible": True} +o_usb_folder_file= {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} +o_usb_folder_id= {"container": o_SettingsBase_SettingsBase, "type": "Text", "unnamed": 1, "visible": True} #object on keyboard to switch to keypad o_switch_keyboard_to_keypad = {"container": o_Gui_MainView, "text": "&123", "type": "Text", "unnamed": 1, "visible": True} o_keyboard_object = {"container": o_Gui_MainView, "type": "Text", "unnamed": 1, "visible": True} Index: tst_service_screen/test.py =================================================================== diff -u -rc93470567d8adf60e6b64224c6cad7f9a2f674ac -rab639c7acff8c8444f869f2ac898a1cd241efa87 --- tst_service_screen/test.py (.../test.py) (revision c93470567d8adf60e6b64224c6cad7f9a2f674ac) +++ tst_service_screen/test.py (.../test.py) (revision ab639c7acff8c8444f869f2ac898a1cd241efa87) @@ -47,13 +47,13 @@ return names.o_services_screen_text_obj def export_log_text(text): - names.o_export_log_file["text"]= text - return names.o_export_log_file + names.o_usb_folder_file["text"]= text + return names.o_usb_folder_file test.log(text) def export_log_id(id): - names.o_export_log_id["id"] = id - return names.o_export_log_id + names.o_usb_folder_id["text"] = id + return names.o_usb_folder_id test.log(id) def navigate_to_settings_screen(): @@ -85,22 +85,30 @@ utils.waitForGUI(1) mouseClick(export_option) test.compare(config.EXPORT_LOGS_OPTIONS[option], waitForObjectExists(names.o_combo_box ).displayText, "User should able to select {}".format(config.EXPORT_LOGS_OPTIONS[option])) + utils.waitForGUI(1) + test.log("verifying slider in export logs") + mouseClick(waitForObjectExists(names.o_usb_folder_slider)) +# parameter_object = export_log_id(text = config.USB_SLIDER_1) +# utility.scroll_to_zone(names.o_usb_folder_slider, direction = "Top") + parameter_object = export_log_id(id = config.USB_SLIDER_1) + utility.scroll_to_zone(parameter_object, names.o_slider_text) - def verify_export_functionality(): """ verify log before clicking export button and after clicking export button """ + test.startSection("Verifying the the export button clicking") + mouseClick(waitForObjectExists(names.o_export_btn )) + utils.waitForGUI(1) + test.compare(waitForObjectExists(names.o_export_btn).text, config.EXPORT_BUTTON_TEXT,"{} screen is displayed".format(config.EXPORT_BUTTON_TEXT)) + test.endSection() -# mouseClick(waitForObjectExists(names.o_export_btn )) -# test.compare(waitForObjectExists(names.o_export_btn).text, config.EXPORT_BUTTON_TEXT,"{} screen is displayed".format(config.EXPORT_BUTTON_TEXT)) -# test.endSection() - - pass def verify_device_shutdown(): - + """ + verify shutdown button after clicking export button + """ mouseClick(waitForObjectExists(names.o_shutdown_btn)) test.compare(waitForObjectExists(names.o_shutdown_btn).text, config.SHUTDOWN_BUTTON_TEXT, "User should able to click {}".format(config.SHUTDOWN_BUTTON_TEXT)) test.endSection() @@ -129,11 +137,8 @@ utils.tstStart(__file__) startApplication(config.AUT_NAME) - #export_log_text(text) - #export_log_id(id) navigate_to_settings_screen() verify_export_logs_screen() - verify_export_functionality() verify_device_shutdown()