according to the Scrpting API GuiVComponent Object | SAP Help Portal
most of the ui elements has more than the attributes that the activity “get attributes” can access. i my case the “IconName” is relevant to know if we need to click or not, in this case we try to use image selector option but the change of the button is only a 5x5px led changing between green and off, which which has proven to be unstable. @LevKushnir@raduc : can you extent the number of attributes to all which are available according to the API?
Dear Lev,
sure, in My case it is a Custom z transaction, but the “IconName” property ca be accessed on every button: e.g. VA01 “Create with reference” the value is “B_COPY”
The Values are “S_LEDI” and “S_LED” or “” if the button/control has no Icon
Cheers mti
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If
myIcon_Name = session.findById("wnd[0]/tbar[1]/btn[8]").IconName
I’ll add the IconName attribute so you can query it from UiPath. In the meantime you can also try using the Tooltip attribute and check if it works for your usecase.