Can't select item in SAP using Code stage

MAHJ

New Member
#1
Hi,

I am using SAP for a use case where I need to highlight a row and press a button. However, when I tried to use the SAP mode to spy this row that I need to highlight, it's unable to select that row as a unique element. Please refer to the image.
I used the code stage (used SAPs built in recorder to get the attributes of the row) but it is still unable to highlight that row. It directly presses the button:

dim SapGui as object
dim session as object
dim Connection as object
Sapgui = Getobject("SAPGUI")
dim Application as object
Application = SapGui.GetScriptingEngine
Connection = Application.Children(0)
session = Connection.Children(0)

session.findById("wnd[0]").resizeWorkingPane (125,20,false)
session.findById("wnd[0]/tbar[1]/btn[5]").press

The underlined line doesn't seem to be unique. What can be a workaround for this issue?
 

Attachments

Top