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);
        }
Beispiel #2
0
        private bool CallAction(ref Dictionary <string, string> TicketItem, ref Dictionary <string, string> ActionItem, ref List <Dictionary <KPMReadInfo, List <string> > > ReadList, RadioButton rbB2C, string TxtForUpload = null, string Read_Input_String = "")
        {
            bool bResult = true;

            if (CoordinatorCheck(ref TicketItem, ref ActionItem) == false)
            {
                return(true);
            }

            g_Util.DebugPrint("\nI am doing... " + ActionItem["Comment"]);
            bool bSkipable = (ActionItem["Skipable"] == "O")? true: false;

            if (ActionItem["ActionType"] == "CLICK")
            {
                bResult = WA.ClickButton(FF_driver, ActionItem["ID"], ActionItem["SearchType"], bSkipable);
            }
            else if (ActionItem["ActionType"] == "JAVASCRIPT")
            {
                bResult = WA.ExecuteJS(FF_driver, ActionItem["ID"]);
            }
            else if (ActionItem["ActionType"] == "DROPBOX")
            {
                string TicketKey = ActionItem["InputString"];
                bResult = WA.SetComboItem(FF_driver, ActionItem["ID"], TicketItem[TicketKey]);
            }
            else if (ActionItem["ActionType"] == "DROPBOX_BYSELECT")
            {
                string TicketKey = ActionItem["InputString"];
                //bResult = WA.SetComboItemBySelect(FF_driver, ActionItem["ID"], TicketItem[TicketKey]);
            }
            else if (ActionItem["ActionType"] == "INPUT_TEXT")
            {
                string TicketKey = ActionItem["InputString"];
                bResult = WA.SetTextBox(FF_driver, ActionItem["ID"], TicketItem[TicketKey]);
            }
            else if (ActionItem["ActionType"] == "COPY_NUM")
            {
                TicketItem["Number"] = WA.GetText(FF_driver, ActionItem["ID"]);
            }
            else if (ActionItem["ActionType"] == "GOTOURL")
            {
                string URL = ActionItem["ID"] + TicketItem["Number"];
                if (rbB2C.Checked == true)
                {
                    URL += "&oid=";
                }

                GoToURL(URL);
            }
            else if (ActionItem["ActionType"] == "INPUT_UPLOAD")
            {
                bResult = WA.SetTextBox(FF_driver, ActionItem["ID"], TxtForUpload);
            }
            else if (ActionItem["ActionType"] == "CALLEVENT")
            {
                bResult = WA.CallEvent(FF_driver, 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(FF_driver);

            if (ActionItem["ManualWait"] == "O")
            {
                WA.ManualWait(Int32.Parse(ActionItem["WaitTime"]));
            }


            return(bResult);
        }