Forum Discussion
aminsaurabh
10 years agoOccasional Contributor
Hi , i have a VB.NET Application under test and the following code got the job done.
Function selectcell(Grid, Columname, Value) 'select the particular cell and click that cell
Dim i
Dim rowindex
rowindex = -1
For i = 0 To Grid.wRowCount-1
' Check the cell value in the specified column
If Grid.wValue(i, Columname) = Value Then
rowindex = i ' Row is found
End If
Next
if rowindex >=0 Then
Call Grid.ClickCell(rowindex, Columname)
Else
log.Error "value does not exist in the grid lookup","the value you are trying to select does not exist"
End If
End Function
hope this was helpful
Function selectcell(Grid, Columname, Value) 'select the particular cell and click that cell
Dim i
Dim rowindex
rowindex = -1
For i = 0 To Grid.wRowCount-1
' Check the cell value in the specified column
If Grid.wValue(i, Columname) = Value Then
rowindex = i ' Row is found
End If
Next
if rowindex >=0 Then
Call Grid.ClickCell(rowindex, Columname)
Else
log.Error "value does not exist in the grid lookup","the value you are trying to select does not exist"
End If
End Function
hope this was helpful
Related Content
- 10 years agoelfen_dark
- 11 years agokirk_bottomley
Recent Discussions
- 12 hours agoSvetaG