Hi,
I am getting this error while qtp clicks an edit button on the run time.
Details :
In the script
1. i am getting the total no.of rows from a table
2. then in the for loop getting the cell data upto the row count
3. then it need to click the edit button on the page (The page is containing 19 edit buttons) according to the value in the loop.
The code is:
Can anybody help me on this.
I am getting this error while qtp clicks an edit button on the run time.
Details :
In the script
1. i am getting the total no.of rows from a table
2. then in the for loop getting the cell data upto the row count
3. then it need to click the edit button on the page (The page is containing 19 edit buttons) according to the value in the loop.
The code is:
Code:
Set desc = Description.Create()
desc("alt").Value = "Edit"
desc("html tag").Value = "IMG"
desc("image type").Value = "Image Link"
desc("name").Value = "Image"
desc("file name").Value = "edit.gif"
Set List =Browser("name:= Name").Page("title:= Name").ChildObjects(desc)
NoOfChildObjs = List.Count()
Rows = Browser("Browser").Page("Page").WebTable("Table Name").RowCount
Dim j
j=0
For i = 1 to Rows
row = DataTable.GetSheet("Global").GetCurrentRow
ConfigName = DataTable.GetSheet("Global").GetParameter("ConfigName").ValueByRow(row)
'msgbox ConfigName
If ConfigName = "End" Then
ExitTest
else
Config = Browser("Browser").Page("Page").WebTable("Table Name").GetCellData(i,1)
msgbox Config
If Trim(ConfigName) = Trim(Config) Then
j = i - 2
msgbox j
List( j).Click (<- I am getting General Runtime error in this line while clicking the second object ie List(1).click from the child objects but the first iteration is going well ie List(0).click is working.)
msgbox Err.Number ( -214746259 error number is getting displayed)
Edit the text fields and the n click the update button
DataTable.GetSheet("Global").SetNextRow
End If
End If
Next
Can anybody help me on this.