07-06-2018, 09:32 AM
(12-09-2009, 11:04 AM)umer830 Wrote: I have a web table object in my application where i have to search for an element get its row and column number. Once i gett the row number
using
GetRowWithCellText Method "
Next I want to know about column number but i could not find any function to get column number because i want to use object.GetCellData (Row, Column)
method to get complete cell text and verify wheather it contains my required text or not.
You can get the Column name with column number from below code:
Call getColumnName("Employee Name")
Function getColumnName(ColValue)
Col_Names=Browser("").Page("").WebTable("").GetROProperty("column names")
arr=split(Col_Names,";")
counter=0
For Iterator = 0 To UBound(arr) Step 1
Found=0
If arr(Iterator)=ColValue Then
Found=1
Print "Found"
'this is for column possition
counter=counter+1
Exit For
Else
counter=counter+1
End If
'Next
Next
print counter
If Found=1 Then
print "Column Possition:"&"="&counter
Else
print "Column does not exit"
End If
getColumnName=ColValue
End Function