Page 1 of 1

Ranorex not able to identify few SAP elements

Posted: Mon Aug 15, 2016 7:07 am
by hi2suresh
Ranorex version: 6.0.1
System information:
MAIN MODULE INFORMATION:
saplgpad.exe
SAP Logon Pad for Windows
740 Final Release
7400.2.7.1112
1635946

SYSTEM INFORMATION:
Operating system: Windows 7 Enterprise 6.1 (7601)
Service Pack 1

Re: Ranorex not able to identify few SAP elements

Posted: Tue Aug 16, 2016 12:16 pm
by odklizec
Hi,

Please check >this SAP-related topic< (especially post on second page). Hope this helps?

Re: Ranorex not able to identify few SAP elements

Posted: Wed Aug 17, 2016 5:45 am
by hi2suresh
Odklizec, Thanks for looking into the issue. Firstly, scripting is enabled both client and server side.
Another test tool "Tosca" is able to identify without any issues. Based on this I can conclude that its not an SAP settings issue and some Ranorex issue. Also just curious to know if Ranorex can select SAP tabs that are not visible in the screen (my second snapshot: e.g. "E: Custo..")? or should we write some custom code to make the tab visible and then proceed?

Best Regards,
Suresh

Re: Ranorex not able to identify few SAP elements

Posted: Wed Aug 17, 2016 8:12 am
by Martin
Hey!

If you actually see most of the SAP related elements (table items, buttons, SAP menu items, etc) it's not related to any scripting- or server parameter.

Tried it out myself as well and couldn't select the application window menu items separately myself either. But actually could find the whole menu element and under there were the menu item children elements (Menu, Edit, Favorites...).

It seems that when SAP window is out of focus it will not display that menu at all giving Ranorex Spy the impression of those elements being hidden.

But xpath = /form[@connectiondescription='']/?/?/menuitem[@name='Edit'] etc for those menu elements. I advise you to keep the SAP GUI in focus when navigating through them.

For the other 2 elements displayed on your pictures (scrollbar + menu arrow). Can't really capture these elements myself either with Spy. But it's probably more to do with the technology what SAP is developed with historically.

Also about the question you had related to the menu button visibility - if you can actually see it on the screen it's most likely visible. The way the menu text is presented is just a wrapper and the full text should be somewhere in the element parameters.

And a tip on working with tables in SAP: you should move around with bringing specific cells to focus for example. The tables in SAP are tricky as they only present the data that actually gets displayed (+/- some rows and columns). It's a good idea to understand how each table is presented 1st so you could write a good test around it. So get the required data and move down 25 rows for example to bring the next dataset to front.

Re: Ranorex not able to identify few SAP elements

Posted: Fri Aug 19, 2016 12:48 am
by hi2suresh
Martin,

Thanks for the reply.

I've tried accessing the SAP menubar element via xpath and Ranorex is not behaving as expected. Encountering the following error

Failed to move to location 'Center' within element '{MenuItem:System}'.
The pointer cannot be moved to point '{X=-2,Y=-2}' since it is outside of the visible desktop.
Show/Hide Stacktrace
at Ranorex.Mouse.MoveTo(Element element, Location location, Duration moveTime) at Ranorex.Adapter.Click() at SAP_FMT.Recording1.Ranorex.Core.Testing.ITestModule.Run() in d:\Planit\SAP_FMT\SAP_FMT\Recording1.cs:line 87 at Ranorex.Core.Testing.TestModuleLeaf.RunInternal(DataContext parentDataContext)

Regarding the tab question, even though Ranorex is not able to identify the individual tabs via spy I am able to navigate to the invisible tabs (Screesnshot attached) by record and replay.

Best Regards,
Suresh