Esempio n. 1
0
        private bool CheckNotepad(List <string> slit, PcommCore pc)
        {
            bool pass = true;

            pc.LinkToScreen <SJ672>((SJ672) =>
            {
                var str = SJ672.getContent().ToUpper();
                foreach (string s in slit)
                {
                    if (str.Contains(s.ToUpper()) && !string.IsNullOrEmpty(s))
                    {
                        pass = false;
                        break;
                    }
                }
                base.SendKey(KeyBoard.PF3);
                return(true);
            });
            if (!pass)
            {
                pc.SkipToHomeScreen <S0017>();
            }
            else
            {
                CommonScreen comm       = pc.GetScreen <CommonScreen>();
                string       screenCode = comm.GetText(1, 72, 80);
                if (screenCode.Contains("SJ672"))
                {
                    CheckNotepad(slit, pc);
                }
            }
            return(pass);
        }
        public void PcommCoreTestsSetCursorPos()
        {
            PcommCore pcommCore = new PcommCore("A");

            pcommCore.LinkToScreen <IBM_i_Main_MenuScreen>((IBM_i_Main_MenuScreen) =>
            {
                CursorPos point = IBM_i_Main_MenuScreen.SearchText("User tasks");

                return(true);
            });
        }
Esempio n. 3
0
        public bool loopSecheme_id(List <string> slit, int row, PcommCore pc)
        {
            bool keyword = false;

            if (string.IsNullOrEmpty(base.ReadRow(row)))

            {
                Message.Add("row data is empty");
                // throw new Exception("row data is empty");
            }
            else
            {
                base.SetText("Y", row, 2);
                base.Enter();
                row++;

                if (row == 20)
                {
                    //throw new Exception("read data was completed");
                    Message.Add("row data is empty");
                }
                pc.LinkToScreen <SJ672>((SJ672) =>
                {
                    var str = SJ672.getContent();
                    slit.ForEach(x => {
                        if (str.Contains(x) && !string.IsNullOrEmpty(x))
                        {
                            keyword = true;
                            Message.Add(x + "key word is exsits");
                            base.SendKey(KeyBoard.PF3);
                            return;
                            //throw new Exception(x + "key word is exsits");
                            //throw new Exception(x + "key word is exsits");
                        }
                        //else
                        //{
                        //    base.SendKey(KeyBoard.PF3);
                        //}
                    });
                    base.SendKey(KeyBoard.PF3);
                    return(true);
                });
            }
            return(keyword);
        }
        public void PcommCoreTest()
        {
            PcommCore pcommCore = new PcommCore("A");

            pcommCore.LinkToScreen <IBM_i_Main_MenuScreen>((IBM_i_Main_MenuScreen) =>
            {
                IBM_i_Main_MenuScreen.SetCursorPos(2, 4);
                List <string> names = IBM_i_Main_MenuScreen.pcommSessionNames();
                string errorMsg     = string.Empty;
                string message      = IBM_i_Main_MenuScreen.GetTextRect(7, 6, 7, 80);
                IBM_i_Main_MenuScreen.SetText("1", 20, 7);
                bool isSkip = IBM_i_Main_MenuScreen.isSkipScreen(out errorMsg);
                return(isSkip);
            }).LinkToScreen <User_TasksScreen>((User_TasksScreen) =>
            {
                User_TasksScreen.SetText("1", 20, 7);
                return(true);
            }).LinkToScreen <CommonScreen>((commonScreen) =>
            {
                commonScreen.SendKey(KeyBoard.PA1);
                commonScreen.SendKey(KeyBoard.PF3);
                return(false);
            });
        }