frankvanderkuur / robotframework-sapguilibrary

A Robot Framework Library for automating the SAP GUI desktop client
Apache License 2.0
51 stars 20 forks source link

Not able to retrieve getcell value from a SAP table #9

Open shubhimu opened 4 years ago

shubhimu commented 4 years ago

Hi All,

I am doing SAP automation using robot framework SAPGUILibrary.

I am able to login and identify maximum of the elements but not able to get and set Value from a sap table. I tried using below approach to get the value from a saptable.

${value1}= SapGuiLibrary.Get Cell Value /app/con[0]/ses[0]/wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/ssubSUBSCREEN_BODY:SAPMV45A:4400/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG 0 'VBSTT-GBSTA_BEZ' Log To Console ${value1}

Table id is :/app/con[0]/ses[0]/wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/ssubSUBSCREEN_BODY:SAPMV45A:4400/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG
Row no: 0 Columnd id :VBSTT-GBSTA_BEZ'. ALso tried by passing the numeric column id as per the column location i.e 16 in my case

Its giving me below error every time when i am trying to get the cell value from a sap table.

FAIL : AttributeError: .getCellValue

Please let me know how can i resolve this issue.

Thanks, Himanshu

arv-inc commented 3 years ago

Hello! Try this: ${value1}= SapGuiLibrary.Get Cell Value wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/ssubSUBSCREEN_BODY:SAPMV45A:4400/subSUBSCREEN_TC:SAPMV45A:4900/tblSAPMV45ATCTRL_U_ERF_AUFTRAG 0 'VBSTT-GBSTA_BEZ'

Log To Console ${value1}

simonmeggle commented 2 years ago

The error is that getCellValue is not a valid method of the returned COM object. For me it seems that this keyword never could have worked. I have fixed this in a PR.