public bool GoToMainPage(ref List <Dictionary <string, string> > TicketItemList, ref List <Dictionary <string, string> > LActionList, RadioButton rbB2C) { g_Util.DebugPrint("Please Login KPM... "); bool bResult = true; string ID = LActionList[0]["ID"]; string SearchType = LActionList[0]["SearchType"]; WA.TotalWait(FF_driver, ID, SearchType, 600000); // Wait for 10 min to Login. WA.ManualWait(5000); Dictionary <string, string> TicketItem = TicketItemList[0]; List <Dictionary <KPMReadInfo, List <string> > > DummyList = null; for (int nIdx = 0; nIdx < LActionList.Count; nIdx++) { Dictionary <string, string> ActionItem = LActionList[nIdx]; if (ActionItem["Step"] == "StartEvent" && ActionItem["Execute"] != "X") { if (CallAction(ref TicketItem, ref ActionItem, ref DummyList, rbB2C) == false) { bResult = false; break; } } } return(bResult); }
private bool CallAction(ref Dictionary <string, string> TicketItem, ref Dictionary <string, string> ActionItem, ref List <Dictionary <KPMReadInfo, List <string> > > ReadList, string TxtForUpload = null, string Read_Input_String = "") { bool bResult = true; g_Util.DebugPrint("I am doing... " + ActionItem["Comment"]); if (ActionItem["ActionType"] == "CLICK") { bResult = WA.ClickButton(IE, doc, ActionItem["ID"], ActionItem["SearchType"]); } else if (ActionItem["ActionType"] == "JAVASCRIPT") { bResult = WA.ExecuteJS(IE, doc, ActionItem["ID"]); } else if (ActionItem["ActionType"] == "DROPBOX") { string TicketKey = ActionItem["InputString"]; bResult = WA.SetComboItem(IE, doc, ActionItem["ID"], ActionItem["SubID"], TicketItem[TicketKey]); } else if (ActionItem["ActionType"] == "INPUT_TEXT") { string TicketKey = ActionItem["InputString"]; bResult = WA.SetTextBox(IE, doc, ActionItem["ID"], TicketItem[TicketKey]); } else if (ActionItem["ActionType"] == "COPY_NUM") { TicketItem["Number"] = WA.GetText(IE, doc, ActionItem["ID"]); } else if (ActionItem["ActionType"] == "GOTOURL") { object URL = ActionItem["ID"] + TicketItem["Number"]; GoToURL(URL); } else if (ActionItem["ActionType"] == "INPUT_UPLOAD") { bResult = WA.SetTextBox(IE, doc, ActionItem["ID"], TxtForUpload); } else if (ActionItem["ActionType"] == "CALLEVENT") { bResult = WA.CallEvent(IE, doc, ActionItem["ID"], ActionItem["SubID"]); } else if (ActionItem["ActionType"] == "READ_DROPBOX") { int nDepth = Convert.ToInt32(ActionItem["Depth"]); bResult = WA.ReadComboItem(IE, doc, "", "", "", "", 0, nDepth, ActionItem["ID"], ActionItem["ID2"], ActionItem["ID3"], ActionItem["ID4"], ActionItem["Comment"], ref ReadList); } else if (ActionItem["ActionType"] == "READ_INPUT_TEXT") { bResult = WA.SetTextBox(IE, doc, ActionItem["ID"], Read_Input_String); } WA.TotalWait(IE, doc); if (ActionItem["ManualWait"] == "O") { WA.ManualWait(500); } return(bResult); }