All wrong :) starting from the question. In order to click on *"_sweview_" & i* the frames should be added first to Object Repository, and there is no point to create loop when you have such annoying manual process.
1. we need to see the attributes of Frame("_sweview") and Frame("_sweview_2") (question: is it the same frame or they are different?) 2. we need to see the attributes of the image. The final code may look like For i = 2 to 6 Browser("UWindsor").Page("ENG").Frame("url:=dk/ldkl/.*").Image("name:=imageFileName.gif").Click or Browser("UWindsor").Page("ENG").Frame("url:=dk/ldkl/.*").Image("name:=imageFileName.gif", "index:=" & i).Click 'if there is one frame Next Roman On Thu, Sep 25, 2008 at 1:17 PM, Shahid Khan <[EMAIL PROTECTED]> wrote: > Browser("UWindsor").Page("ENG").Frame("_sweview").Image("Select > For i = 2 to 6 > Browser("UWindsor").Page("ENG").Frame("_sweview_" & i).Image("Select > record").Click > Next > Browser("UWindsor").Page("ENG").Sync > > On Thu, Sep 25, 2008 at 12:59 PM, Harish <[EMAIL PROTECTED]>wrote: > >> >> Thanks for your help. sweview_1 cannot be found and do you know how to >> resolve this problem? >> >> On Sep 25, 12:09 pm, "Shahid Khan" <[EMAIL PROTECTED]> wrote: >> > I think >> > >> > For i = 1 to 6 >> > Browser("UWindsor").Page("ENG").Frame("_sweview_" & i).Image("Select >> > record").Click >> > Next >> > Browser("UWindsor").Page("ENG").Sync >> > >> > >> > >> > On Thu, Sep 25, 2008 at 11:49 AM, Harish <[EMAIL PROTECTED]> >> wrote: >> > >> > > I am very new to VB programming and I am picking up the fundamentals. >> > > Does anybody know how to loop this script. >> > >> > > Browser("UWindsor").Page("ENG").Frame("_sweview").Image("Select >> > > record").Click >> > > Browser("UWindsor").Page("ENG").Frame("_sweview_2").Image("Select >> > > record").Click >> > > Browser("UWindsor").Page("ENG").Frame("_sweview_3").Image("Select >> > > record").Click >> > > Browser("UWindsor").Page("ENG").Frame("_sweview_4").Image("Select >> > > record").Click >> > > Browser("UWindsor").Page("ENG").Frame("_sweview_5").Image("Select >> > > record").Click >> > > Browser("UWindsor").Page("ENG").Frame("_sweview_6").Image("Select >> > > record").Click >> > > Browser("UWindsor").Page("ENG").Sync >> > >> > > I would appreciate your help on this. Thanks >> > >> > > Swamy- Hide quoted text - >> > >> > - Show quoted text - >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to MercuryQTP@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en -~----------~----~----~----~------~----~------~--~---