SAP Selectors - Identify Each Element

SAP Selectors - Identify Each Element .

Description

Issue : the selector cannot identify the UI element

Troubleshooting steps

Approach 1# :

Ensure the SAP scripting is enabled for a client and server end for the SAP application.
If not request you to please enable the scripting for SAP application:

SAP GUI Scripting is required in order to enable UI elements recognition capabilities in SAP automation.
Here are the steps for enabling it:

  1. Server Side
    Login to your SAP server.
    Run transaction RZ11. Specify the parameter namesapgui/user_scripting and click Display. If “Parameter name is unknown” appears in the status bar, this indicates that you are missing the current support package. Check your installed packages. Change the value of sapgui/user_scripting to TRUE.
    sap_scripting.png700x452 12.6 KB
    Click Save.
  2. Client Side
    Open SAP GUI Options
    Go to Accessibility & Scripting/Scripting
    Enable scripting : checked
    Notify when a script attaches to SAP GUI: unchecked

Approach 2#: If still unsuccessful in identifying selectors, try below options :

  1.  In few known scenario despite seeing the server side & client side scripting enabled, the “Recording and Playback” option is not enabled for the user. Please enable the same and check if you can find the selectors. 
  2.  Confirm from SAP server admin team and verify if your user ID have authorization for one “S_SCR” object (SAP Object).Confirm if you have the required authorization.

Approach 3#: 

Steps to be taken after the above approach: 
1. Opened only Studio with elevated privileges (admin) and try getting the reliable selectors. If you can see the selectors that means SAP is running at higher privileges than UiPath studio. Hence, reach out to your admin team to make SAP also run as same or lower privileges than UiPath. 
2. Opened both SAP & Studio in admin mode and try getting the reliable selectors. 
3. Changed the display settings to 100% , followed by reboot of the server. 
4. Tried getting selectors in all the using Framework mode as 

  • Default
  • Active Accessibility
  • Ui Automation

 

If all the above fails , request you to raise a case with below details :

  1. Event Viewer logs 
    <ol><li>Go to&nbsp;Start &gt; Run &gt; eventvwr.</li><li>Right-click&nbsp;Windows Logs -&gt; Application&nbsp;and select&nbsp;Save Log Files As.</li><li>Save the log in the EVT format and share it .</li></ol>
    </li><li><strong>Diagnostic logs</strong>
    <ol><li>Open Command Prompt as an administrator.</li><li>Go to the install folder (where UiPath is installed)</li><li>Run the following command - UiPath.DiagTool.exe --file=C:\logs.zip, This will generate a zip file on C:\ drive named logs.zip</li></ol>
    </li><li><strong>Trace Logs</strong>
    <ol><li>Rename execution log, studio log files for that particular day.</li><li>Enable low level tracing (Open command prompt with admin access -&gt;Navigate to C:\Program Files (x86)\UiPath\Studio -&gt; Type: UiRobot.exe --enableLowLevel )</li><li>then run the process</li><li>Disable Low level tracing with below command.
    	<ol><li>UiRobot.exe --disableLowLevel</li></ol>
    	</li><li>this will save .etl file on the desktop. Please send us the same.</li></ol>
    </li></ol>
    

    Another possibility:
    There is a case where upgrading SAP to 7.6 made some selectors for cells in a grid fail to work. Instead of individual cells, a whole table is selected.
    Tried to use SAP’s native recording functionality, and it made SAP to crash.
    Turned out is was a bug in SAP. Upgrading it to SAP7.6 Patch Level 5 resolves the issue.