Hi,
I restarted the QTP and application still the problem exists.
The script scenario is
The page is having some rows of record say 19 in a grid, each row is having an edit button to update values in the record.
I need to automate the scenario that the records need to be updated will be given in the QTP datatable so the script should click the edit button of the appropriate record then update the values and save the changes.
For the above scenario i followed the steps
1.Open the specified page
2.Get the child objects for specified property(ie List).
3.Get the row count of the web table where the records are.
4.In the for loop i = 1 to row count
i .Get the value from the QTP Datatable by ValueByRow(row) and assign it to variable say a.
ii. Get value of the cell by getcelldata(i,1) and assign it to variable say b
iii.Compare whether a and b are equal if so then click the corresponding child object (edit button) through the command List(j).click( Since j = i-2 as the row in the web table is heading).
iv. Update the values.
v. Set the next row in the QTP datatable untill the row count.
Note: while executing the script for the first row of record from the QTP table the object (List(0)) is get clicked and updated
on the second row of record it throws a Run Error msgbox on clicking the (List(1)) ( ie j = i - 2 )object but the script is able to click the List(1) object if it is not defined with a variable.
Also is there any other way to automate the above scenario? .
Regards
Prema.
Hi A.Saini,
Yes,your understanding is correct.
Also the "Image link" is available for every row inside the grid.
I restarted the QTP and application still the problem exists.
The script scenario is
The page is having some rows of record say 19 in a grid, each row is having an edit button to update values in the record.
I need to automate the scenario that the records need to be updated will be given in the QTP datatable so the script should click the edit button of the appropriate record then update the values and save the changes.
For the above scenario i followed the steps
1.Open the specified page
2.Get the child objects for specified property(ie List).
3.Get the row count of the web table where the records are.
4.In the for loop i = 1 to row count
i .Get the value from the QTP Datatable by ValueByRow(row) and assign it to variable say a.
ii. Get value of the cell by getcelldata(i,1) and assign it to variable say b
iii.Compare whether a and b are equal if so then click the corresponding child object (edit button) through the command List(j).click( Since j = i-2 as the row in the web table is heading).
iv. Update the values.
v. Set the next row in the QTP datatable untill the row count.
Note: while executing the script for the first row of record from the QTP table the object (List(0)) is get clicked and updated
on the second row of record it throws a Run Error msgbox on clicking the (List(1)) ( ie j = i - 2 )object but the script is able to click the List(1) object if it is not defined with a variable.
Also is there any other way to automate the above scenario? .
Regards
Prema.
Hi A.Saini,
Yes,your understanding is correct.
Also the "Image link" is available for every row inside the grid.

