Posts: 18
Threads: 8
Joined: Dec 2009
Reputation:
0
12-09-2009, 11:04 AM
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.
Posts: 1,199
Threads: 5
Joined: Nov 2008
Reputation:
0
12-09-2009, 11:14 AM
once you get the row using GetRowWithCellText, loop through all the columns of webtable and find the column in which your text is there
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
12-09-2009, 11:51 AM
Umer,
My 2 cents would you be to ask not to use getrowwithcelltext as the only option. In a webtable if you have rows with data which are duplicate then you will get the data of the first one and not the second one.
IF i were you then i would do the below,
1. Get the Row Count.
2. Get the Column Count
3. Loop through the Rows & columns using the GetCelldata(r, c).
4. From the CellValue obtained match it against the value you need.
5. Report Pass
5. Exit the Loop at that point.
6. If not found Report Fail.
Go ahead and write the code based on the above logic and you will get what you need.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.