how to use the References Ranorex.Plugins.SapTypes

Class library usage, coding and language questions.
nivasd16
Posts: 14
Joined: Fri Jan 22, 2016 11:17 pm

how to use the References Ranorex.Plugins.SapTypes

Post by nivasd16 » Mon Oct 10, 2016 2:14 am

Hi Team,
I am currently working on SAP Automation using Ranorex. There are lot methods available under the class Ranorex.Plugins.SapTypes ,but not aware how to use those methods for successfully automate the SAP Applications. Can someone help me / provide me some references or examples on using the method under that SAP class . it would be great if someone can provide me the example on using the method GuTree.GetNodeKeyByPath(string Path);


Regards
Srinivas

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: how to use the References Ranorex.Plugins.SapTypes

Post by Martin » Mon Oct 10, 2016 11:11 am

I'd like to know more about this as well. I work with SAP daily and I have never used any built in methods for SAP in Ranorex just because the information on them is quite lacking. When you acutally add the reference of the Ranorex.Plugin.Sap it will become even more complicated. Probably some of the methods would be useful for some edge cases that currently need a workaround hack to properly work. But try to find a specific method from the given 3400 methods without a referential documentation.

So to sum up, I believe that there is a benefit in using the Sap related methods already implemented, but the information on the use is quite lacking.

User avatar
N612
Posts: 135
Joined: Mon Jul 11, 2016 4:01 pm

Re: how to use the References Ranorex.Plugins.SapTypes

Post by N612 » Tue Oct 11, 2016 4:34 pm

There is a searchable API document that may help you more easily browse Ranorex's API. Typically I access this within Ranorex Studio > Help > API Documentation or online.

Are you only using the Ranorex API and not Ranorex Studio? Using Ranorex Studio's record option, I can record all of my actions in SAP, then playback or modify the recording. If I wanted to use code specifically for something, I often start by recording it in Studio, then convert to user code to see how to use the API.
2016-10-11 11_29_13-.png

Code: Select all

public void Mouse_Click_Search()
        {
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'TestAutomationUserGuideRanorexAu.Search' at 19;19.", repo.TestAutomationUserGuideRanorexAu.SearchInfo);
            repo.TestAutomationUserGuideRanorexAu.Search.Click("19;19");
        }
Is there something more specific you are trying to achieve or something blocking you from moving forward with automation? Do you have any issues with object recognition in SAP (SAP usually requires some addition steps prior to automation)?
You do not have the required permissions to view the files attached to this post.

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: how to use the References Ranorex.Plugins.SapTypes

Post by Martin » Wed Oct 12, 2016 8:23 am

N612 wrote:There is a searchable API document that may help you more easily browse Ranorex's API. Typically I access this within Ranorex Studio > Help > API Documentation or online.

Are you only using the Ranorex API and not Ranorex Studio? Using Ranorex Studio's record option, I can record all of my actions in SAP, then playback or modify the recording. If I wanted to use code specifically for something, I often start by recording it in Studio, then convert to user code to see how to use the API.
2016-10-11 11_29_13-.png

Code: Select all

public void Mouse_Click_Search()
        {
            Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'TestAutomationUserGuideRanorexAu.Search' at 19;19.", repo.TestAutomationUserGuideRanorexAu.SearchInfo);
            repo.TestAutomationUserGuideRanorexAu.Search.Click("19;19");
        }
Is there something more specific you are trying to achieve or something blocking you from moving forward with automation? Do you have any issues with object recognition in SAP (SAP usually requires some addition steps prior to automation)?
The usercode doesn't actually use the SapTypes reference methods, it's just a common click action. Furthermore the API documentation is lacking the part related to that reference.

But what i'm talking about is more related to custom functionality and working with presented data that needs specific logic. Furthermore i've always found SAP tables and accessing the (correct) data in them quite time consuming and difficult as each table will need it's own algorithm and workflow to get it correctly. But the SapTypes library seems to include some methods that from the name of them suggest they are ment for directly working with tables. You can't really achive this through recording.

Martin

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: how to use the References Ranorex.Plugins.SapTypes

Post by Support Team » Wed Oct 12, 2016 12:22 pm

nivasd16 wrote:how to use the References Ranorex.Plugins.SapTypes
Short answer: don't use them at all!

All types in the Ranorex.Plugin namespace (and child namespaces) are not designed to be used by Ranorex users. All those types are used by Ranorex internally to provide object recognition for different technologies and are just public to allow our support personnel to extend Ranorex plugins in case of object recognition problems. (That is also the reason why they are not documented.)

The types in the Ranorex.Plugins.SapTypes namespace reflect the SAP interop types, i.e. exported by SAP and used internally by Ranorex to enable object recognition.
If you don't know what to do with those types, just ignore them -- understanding and using them would actually make you re-invent the Ranorex SAP plugin :)

Regards,
Alex
Ranorex Team

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: how to use the References Ranorex.Plugins.SapTypes

Post by Martin » Wed Oct 12, 2016 12:34 pm

Great to know! I actually knew from what I've read that the Ranorex.Plugin references were for Ranorex internal use only but kind of didn't put it into this context.

Thanks,
Martin