/* * IBM Confidential * OCO Source Materials * 5724-U18, 5737-M66 * (C) COPYRIGHT IBM CORP. 2023 * The source code for this program is not published or otherwise divested of its trade secrets, irrespective to what has been deposited with the U.S. Copyright Office. */ /* Note: Please refer this ticket for list of scenarios covered in this script: MASISMIG-29462 & 35016 Steps: 1)Login to Manage 2)Navigate to Automation Script 3)Click on Create 4)Click on Script 5)Enter the Mandatory Fields 6)Click on Create 7)Click on Close Button for System Message. 8)Search & Run the script 9)Automation Script should ran successfully. 10)Validate Work Order is created in Work Order Tracking 11)Follow above steps to create script for deleting work order 12)Validate Work Order is deleted & should not be visible in Work Order Tracking */ /* IBM Interaction Recorder output file */ { "configuration":{ "keywords":["autoscript"] }, # Create new Automation Script to add Work Order "interactions": [ {"event":"gotoApp","app":"autoscript"}, {"index":0,"event":"clickMenu","id":"m74daaf83_ns_menu_CFGLNCHPT_HEADER_sub_CFGSCRIPT_OPTION_a","eventType":"click","params":["m74daaf83_ns_menu_CFGLNCHPT_HEADER_a"],"comment":"Click the Script menuitem"}, {"index":1,"comment":"showdialog : Create Script"}, {"event":"makeVariable","random":"string:5","params":["suffix"]}, {"event":"makeVariable","static":"addWorkOrderScript_Test{$suffix}","params":["addWoAutoScript"]}, {"index":2,"event":"typeover","id":"m895eac72-tb","params":["$addWoAutoScript"],"comment":"Type {$addWoAutoScript} in the Script field","eventType":"change"}, {"index":3,"event":"typeover","id":"m895eac72-tb2","params":["{$addWoAutoScript} Work Order Test"],"comment":"Type {$addWoAutoScript} Work Order Test in the Script field","eventType":"change"}, {"index":4,"event":"keystroke","id":"m895eac72-tb2","params":[9,"\t",false,false,false],"comment":"Press the TAB key in the Script Description field","eventType":"keydown"}, {"index":5,"event":"typeover","id":"m1057fdc8-tb","params":["python"],"comment":"Type python in the Script Language field","eventType":"change"}, {"event":"makeVariable","random":"string:5","params":["newWo"]}, {"index":6,"event":"typeover","id":"createscript_step3_object_main_grid2_attr1_5_aceeditor","params":["from psdi.server import MXServer\nfrom psdi.iface.util import SecurityUtil\nworkorderSet=MXServer.getMXServer().getMboSet(\"WORKORDER\",SecurityUtil.getNewUserInfo())\nworkorderMbo=workorderSet.add()\nworkorderMbo.setValue(\"wonum\",\"{$newWo}\")\nworkorderSet.save()"], "comment":"Type from psdi.server import MXServer from psdi.iface.util import SecurityUtil workorderSet=MXServer.getMXServer().getMboSet(\"WORKORDER\",SecurityUtil.getNewUserInfo()) workorderMbo=workorderSet.add() workorderMbo.setValue(\"wonum\",\"{$newWo}\") workorderSet.save() in the Script Text field","eventType":"change"}, # Click Create button to create the script. {"event":"sleep","params":[10]}, {"index":7,"event":"click","id":"mb1f2f5fe-pb","comment":"Click the Create button in the dialog","eventType":"click"}, {"index":8,"comment":"hidedialog : Create Script"}, {"index":9,"comment":"showdialog : System Message"}, {"index":10,"event":"click","id":"m15f1c9f0-pb","comment":"Click the Close button in the dialog","eventType":"click"}, {"index":11,"comment":"hidedialog : System Message"}, # Search & Run Automation Script {"index":12,"event":"typeover","id":"m6a7dfd2f_tfrow_[C:1]_txt-tb","params":["$addWoAutoScript"],"comment":"Type {$addWoAutoScript} in the Script filter field","eventType":"change"}, {"index":13,"event":"click","id":"m6a7dfd2f-ti2_img","comment":"Click the Filter Table image in the Scripts table","eventType":"click"}, {"index":14,"event":"click","id":"m6a7dfd2f_tdrow_[C:1]_ttxt-lb[R:0]","comment":"Click the link for record {$addWoAutoScript}","eventType":"click"}, ] }