Beispiel #1
0
        void _sapGuiSession_EndRequest(GuiSession Session)
        {
            ScreenDatas.Add(_currentScreen);
            Tuple <string, string, string, int, string> sessionInfo = new Tuple <string, string, string, int, string>(Session.Info.SystemName, Session.Info.Transaction, Session.Info.Program, Session.Info.ScreenNumber, Session.ActiveWindow.Text);


            GuiStatusbar status = _sapGuiSession.FindById <GuiStatusbar>("wnd[0]/sbar");

            if (status != null)
            {
                switch (status.MessageType)
                {
                case "E":
                    _currentScreen.Status = ScreenStatus.Fail;
                    if (OnRequestError != null)
                    {
                        OnRequestError(this, new SAPRequestInfoArgs(status.Text));
                    }
                    break;

                case "S":
                    _currentScreen.Status = ScreenStatus.Success;
                    if (OnRequestSuccess != null)
                    {
                        OnRequestSuccess(this, new SAPRequestInfoArgs(status.Text));
                    }
                    break;

                case "W":
                    _currentScreen.Status = ScreenStatus.Warning;
                    if (OnRequestWarning != null)
                    {
                        OnRequestWarning(this, new SAPRequestInfoArgs(status.Text));
                    }
                    break;

                default:
                    _currentScreen.Status = ScreenStatus.Pass;
                    break;
                }
            }

            newScreen(sessionInfo);
        }
Beispiel #2
0
 public void End()
 {
     autoScreenShot();
     ScreenDatas.Add(_currentScreen);
 }