Skip to Content
avatar image
Former Member

Getting error when creating GUISession

I m following this C# code to automate C#
SapROTWr.CSapROTWrapper sapROTWrapper = new SapROTWr.CSapROTWrapper();
object SapGuilRot = sapROTWrapper.GetROTEntry("SAPGUI");
object engine = SapGuilRot.GetType().InvokeMember("GetScriptingEngine", System.Reflection.BindingFlags.InvokeMethod, null, SapGuilRot, null);
GuiApplication GuiApp = (GuiApplication)engine;
GuiConnection connection = (GuiConnection)GuiApp.Connections.ElementAt(0);
GuiSession session = (GuiSession)connection.Children.ElementAt(0);

Initially it was working, but now i am getting error as The enumerator of the collection cannot find en element with the specified index. when i try to initialize to session object.

Using SAPLogOn 730 GUI

please help guide me to resolve it

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers