cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot spy SAP in Accessibility Mode

SenneSymons
Level 3
Hi,   We're unable to correctly spy SAP using the Accessibility mode. It will detect the general windows of SAP, but not the individual elements within SAP (buttons, textboxes, ...) SAP settings are configured to use Accessibility Mode.   One cause may be that we are using an App-V version of SAP. Spying in SAP mode however works perfectly fine for 99% of the UI elements, but we really need AA for the other 1%... Kind regards,  
4 REPLIES 4

IanGrant
Level 3
A couple questions.   1) Have you enabled SAP GUI Scripting on your server side? 2) Have you had any success using the SAP Spy mode, or have all your interactions been via UI/AA? 3) Which version of SAP are you using.. 730... 740..etc? 4) Are there specific transactions or transaction families that are giving you trouble, or is it a general problem?   The SAP GUI can be hard to interact with on some screens (ALV outputs and menu navigations come to mind), but most of those road blocks can easily be solved via code blocks if needed.

SenneSymons
Level 3
1. I don't think SAP GUI Scripting is enabled Server Side. 2. SAP Spy mode works perfectly. 3. SAP Version 740. 4. There are certain buttons that I cannot spy using SAP mode, these I would like to spy using AA mode (no other spying option works).   Thanks!

SenneSymons
Level 3
I checked and Server Side scripting appears to be enabled.

IanGrant
Level 3
Hey,   If SAP Spy mode works perfectly, then I believe that your server side has to be set up. Otherwise it can't make the connection to do the spying in the first place.   It sounds like you're running into the issue I mentioned at the end of my last post. One work around I've found is to record the interaction using the SAP Script Recording And Playback function within SAP. You have two choices at this point. You can create a code block stage and interact with your element via the code block (this approach has implications for session/connection management and requires binding), or you can access the vbs file this creates and rip out the syntax and then place it back into a dummy element you spied using the SAP Spy mode. If you go with the second option, then the syntax will need to be manually edited a little since the script recorder uses the findbyid method with the SAP API while the BP element needs to take a different convention. Conversion example below: SAP Recorded - session.findById(""wnd[0]/usr/tblSAPLSE16NSELFIELDS_TC/btnOPTION[1,1]"") BP Compatible - /app/con[0]/ses[0]/usr/tblSAPLSE16NSELFIELDS_TC/btnOPTION[1,1]   Obviously you need to be careful if your automation plans use more then one connection or session within SAP. I advise you access the SAP GUI Help option form the SAP menu and read the introduction section for an overview of the runtime hierarchy.