Posts: 6
Threads: 2
Joined: Apr 2013
Reputation:
0
04-17-2013, 10:55 AM
Hi,
I am using GetCellData() method on a table like...
first name last name Phn no.
WebEdit WebEdit WebEdit
When i use method for first line, I get the desired result, but I use this method for second line, it returns the name of WebEdit.
I want to retrive the data which I enter in the WebEdit box.
Do anyone have idea?
Regards,
sumit
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-17-2013, 11:22 AM
Can you paste your code as to what you have been trying?
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.
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-18-2013, 07:02 AM
Interesting. I sense you are very interested to learn, and so, I am gonna do one better for you
Here is a better way to approach a table,
1. Find out the total number of rows
2. Find out the total number of columns
3. Use a loop to iterate the entire table and fetch the data.
I know it sounds stupid with 3 steps, but here is what i meant,
Code:
For i = 0 to Rowcount
For j = 0 to ColumnCount
Text = Browser("Find a Flight: Mercury").Page("Book a Flight: Mercury").WebTable("First Name:").GetCellData(i, j)
Next
Next
This is only a structural representation. Although, i could write the answer out, i would encourage you to pick the clues i gave and find what you need
Good luck !!
"Give a fish to a man and you feed him for a day, Teach a man to fish and you feed him for Life !!!"
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.
Posts: 6
Threads: 2
Joined: Apr 2013
Reputation:
0
04-19-2013, 04:13 PM
Hi Basanth,
With the mentioned method using For loop, I am getting the values which are already stored in the table as shown in table structure. For ex: for 2nd row, col 1 & 2 are null and for 3rd col all values in te list.
Suppose I enter "John" in first name, then using GetCellData(), I get the null value, though I can get this entered value using GetRoProperty("Value").
Is there any way to get values entered at the time of execution or GetCelldata return only values which are stored in the table.
Thanks,
Sumit
Posts: 1,003
Threads: 1
Joined: Jul 2009
Reputation:
5
04-22-2013, 07:52 AM
No, GetCellData will retrieve the value during runtime as well. However, once you enter the data try to navigate out of the cell, probably it is reading the cell content as a webelement instead of a table?
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.