Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Reading Editboxes in Table
#1
Not Solved
Hello,

I am trying to read values in edit boxes that are in a webtable.

There are 8 rows and 2 columns in the table, and each cell has an edit box. If I write a look to go from 1 to 8. The loop is looking at each row, instead of going through entire column.

My question is, how can I loop through the each column in a table before looping through the next column. Please see code below and the attachment.

Thanks,
Raj

Code:
Set a = Browser("Asset Price Verification").Page("Asset Price Verification").WebTable("Tiered Dealer Dispersion")

RowCount = a.GetROProperty("rows")
ColumnCount = a.GetROProperty("Cols")


Set oEdit = Description.Create()
oEdit("micclass").value = "WebEdit"

set Childobj = Browser("Asset Price Verification").Page("Asset Price Verification").WebTable("Tiered Dealer Dispersion").ChildObjects(oEdit)

    For j = 1 to RowCount

For i = 1 to ColumnCount

Next
            eValue = Childobj(j).GetRoProperty("value")
                IF eValue <>""  THEN

                    Reporter.ReportEvent 0, "All the data has be populated "&eValue, "Successful"
                                    ELSE

                    Reporter.ReportEvent 1, "All the data has NOT been populated "&eValue, "FAIL"
                                END IF

    Next
Next


Attached Files Image(s)
   
Reply
#2
Not Solved
I think 'GetCellData' should work here, have you tried with this?

Code:
For i = 1 to RowCount
    For j = 1 to ColumnCount
        eValue = Browser("Asset Price Verification").Page("Asset Price Verification").WebTable("Tiered Dealer Dispersion").GetCellData(i,j)
    Next
Next

Reply
#3
Not Solved
Saket: Thanks for the reply.

GetCellData, did not work. Not able to read data from edit boxes. Reading the data itself is not a issue. But reading the data in all the edit boxes is.

This is the issue, if the run the loop form i = 1 to 8 it is reading each row. Meaning, it is able to reach only until the 4th row. But I want to complete reading a column, before reading the next column.
Reply
#4
Not Solved
Hi,

First try to get the row number using orig year

Code:
intRowNum=Browser("").Page("").Frame("").WebTable("").GetRowWithCellText(pass the year)



Set objWebEdit=Browser("").Page("").Frame("").WebTable("").ChildItem(intRowNum,Coulumn,"WebEdit",index)
strText=objWebEdit.GetROProperty("innerText")
If we want the first web edit pass index as 0 and if we want the second one pass it as 1,
Put this code in a loop, i belive this will solve your problem.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading XML Data from a WebPage shaan.mishra87@gmail.com 1 2,033 09-28-2016, 09:16 PM
Last Post: supputuri
  Reading an amount from statement shipu 0 1,819 12-24-2013, 01:42 AM
Last Post: shipu
  reading a value for GIF image sujaravi123 1 2,353 03-29-2012, 07:47 PM
Last Post: Ankesh
  Reading the position (x,y) of a text in WebElement writetoprabha 2 6,203 05-30-2011, 02:08 PM
Last Post: Sathiya
Exclamation I wanted to automate the process of reading new emails amit198026 2 2,852 09-07-2010, 09:45 AM
Last Post: Arun Prakash

Forum Jump:


Users browsing this thread: 2 Guest(s)