0

I have my GuiSession. that data is saved only with the enter button pressed. then I would like to know if there is any function that I accept to send the button command. without having to emulate. because the window will not always be in focus.

im using C# .net 5.1 using SAPFEWSELib; for automation

            var savebutton = guiSession.FindById("/app/con[0]/ses[0]/wnd[0]/tbar[0]/btn[11]") as GuiButton;
            savebutton.Press();
            var aaaa = guiSession.FindById("/app/con[0]/ses[0]/wnd[0]/") as GuiStatusPane;
            //here enter press
            // example: Guisession.SendKey("enter");

sao only save if im press enter key. if im press button save this retur error because dont allow

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

1 Answers1

0

you need to search a gui frame window. and set focus; this exists a function SendVKey(); Example:

                GuiFrameWindow tosendenter = guiSession.FindById("/app/con[0]/ses[0]/wnd[0]/") as GuiFrameWindow;

            Console.WriteLine("Simulando enter");
            tosendenter.SetFocus();
            tosendenter.SendVKey(00);

sorry my english