SAP automation same image icon

How to click second number icon on SAP application if there are two same image icons with same selectors?
Please help

@Kirti_Srivastava

Hello Kirti,

an interesting question.

From the perspective of the SAP GUI Scripting is the path of an UI element, the selector, always different.

Here is an example:
/app/con[0]/ses[0]/wnd[0]/tbar[1]/btn[34]
/app/con[0]/ses[1]/wnd[0]/tbar[1]/btn[34]
The same button, but in different sessions. ses[0] on the one hand and ses[1] on the other hand.

From the perspective of UiPath they are not really different:
<wnd app='saplogon.exe' cls='SAP_FRONTEND_SESSION' title='SAP Easy Access' />
<sap id='tbar[1]/btn[34]' />

If your requirement needs it, it is necessary to differentiate that.

If you work on different SAP systems add sapSysName to your selector:
<wnd app='saplogon.exe' cls='SAP_FRONTEND_SESSION' title='SAP Easy Access' sapSysName='C10' />

If you work on the same SAP system with different sessions add sapSession to your selector:
<wnd app='saplogon.exe' cls='SAP_FRONTEND_SESSION' title='SAP Easy Access' sapSession='1' />

Or the combination of both.

You gain the security that your automatism is executed in the right system and even in a defined session. But you also lose the flexibility to run your automatism in other systems or sessions. A compromise here would be to make it more flexible via variables, if necessary.

Best regards
Stefan

1 Like

so for different SAP sessions bot will open two SAP windows ?