Tricentis Tosca 16.0 Released on Feb-2023 ----- UFT has been upgraded from UFT 15.0.1 to UFT One 15.0.2, Beginning at November 2020.

Sunday 31 January 2021

Find the no of columns in the given table, if no of columns in not equal to the required count, then click filter button and change layout of the table.

 

Dim TableColumns

SAPGuiSession("Session").SAPGuiWindow("Access").SAPGuiOKCode("OKCode").Set "me23n"
SAPGuiSession("Session").SAPGuiWindow("Access").SendKey ENTER
TableColumns = SAPGuiSession("Session").SAPGuiWindow("PO").SAPGuiTable("SAP").ColumnCount

If TableColumns < 4  Then
     SAPGuiSession("Session").SAPGuiWindow("PO").SAPGuiTable("SAP").SelectCell 1,"item" 
     SAPGuiSession("Session").SAPGuiWindow("PO").SAPGuiButton("Set filter").Click
     SAPGuiSession("Session").SAPGuiWindow("filter").SAPGuiGrid("GridView").SelectCell 5,"ColumnName"
     SAPGuiSession("Session").SAPGuiWindow("filter").SAPGuiGrid("GridViewCtrl").SelectRow 5
     SAPGuiSession("Session").SAPGuiWindow("filter").SAPGuiButton("Add filter criterion").Click
     SAPGuiSession("Session").SAPGuiWindow("filter").SAPGuiButton("Enter").Click
End If  



No comments:

Post a Comment

Note: only a member of this blog may post a comment.