Quality Testing

Quality is delighting customers

To select next row in the Grid(how to use loop) plz. anybody help. its urgent!!!!

Hi,

I am having a list of items in a Grid. By clicking each item of "edit" link it will go to the Edit page to edit perticular Item details.

So kindly anybody help how to loop this to select the next row of item in a Grid. We have to click each row of "Edit" link for modifying. How to do it in QTP.


Regards
Chitra.C

Views: 241

Reply to This

Replies to This Discussion

Hi Swarupa,

Thanks for the reply.

Sorry it is not a table. The items are displayed in the Grid with the "Edit" link for each.

If i insert this code in the middle i.e after "login" script code it is logging into the website and immly coming out and displaying Test Result.

plz let me know for Grid not a table.


Regards
Chitra.C
Hi Chitra,

Swarupa's exampel won't work for your scenario. That is an example of data parametrization using the datatable. I guess you are pointing about a webtalble or grip in a web page, right?

Bibin
i misunderstood the question..............

swarupa
Hi Chitra,

RCnt = Browser("xyz").WebTable("xyz").RowCount
For i = 0 To RCnt
Browser("xyz").Link("text:=Edit","index:="&i&""").click
'Add operations here.......
Next

may be helpful........

Best Regards,
Bibin
Thanks Bibin,

Sorry it is not a table. It's Grid and Items are displayed with the "Edit" link.

plz tell me how to do it. I am new to the script. thats why asking help to everyone.

Regards
Chitra.C
What kind of Grid your application in using? Is it any third party control or a wbfultragrid?
if it is possible attach the screen shot of the page on which u have that grid with "Edit " link so that we can get an idea exactly what is ur requirement

Regards
Swarupa
Hi Swarupa,

plz find the screenshot which has Grid with "Edit" link for each item. For this only i need to put into loop.

Regards
Chitra.C
Attachments:
anybody plz help on this its urgent...
Hi Chitra,

I don't know what kind of grid it is. You can ask the developer about it.
If it is a WbfGrid, then u can find the row count using RowCount(). The Spy the Edit link and see "index" property is available. If it is available then use the logic of my previous example.

Plz note this index:="&i&""", where i is variable used in the for loop.

For i = 0 To RCnt
Browser("xyz").Link("text:=Edit","index:="&i&""").click
'Add operations here.......
Next
Bibin,

I tried this but there is no RowCount() available to get the no. of rows.

regards
Chitra.C
Then i guess it is not a WbfGrid. Check with the developers and let us know the type of Grid.
Or is there any other way you can find the no. of records in the table. If so make use of that.

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service