Skip to Content
0
Jan 06, 2023 at 02:32 PM

How do we fetch the text from a input box in SAP GUI desktop client using c# (Automation)

181 Views

I'm trying to automate SAP GUI Desktop client in C# and using these article as an reference for the same

I'm able to launch the GUI and perform the required operations but unable to fetch text from a input box and then some text from the execution logs. I have tried this code to get the text but this doesn't seems to be working.

GetProperty(this.ID, "text", new object[1] { requiredLocator })

The error that I get is

CLR/System.Reflection.TargetInvocationException

which will occur if the locator is not loaded properly, which is not the case here.

Is there any way we can fetch the text? Also, is this the recommended way to do this?