I guess because the value of variable i is not changes in while loop it only will change when reaches to for loop.. what if there is 1 for loop and inside that for loop there can be 10 while loop so for that while loop value of i will never change.
On Tuesday, May 21, 2013 5:15:07 AM UTC-4, [email protected] wrote: > Hello, > I am trying to run a loop so when i run a script, after 1st loop it goes > to next vehicle but it is keep pick same vehicle every time > > Dim bro, url > bro = "iexplore" > 'url = "https://www.gmcard.com/" > url ="https://www.gmcard.com/grid-data?region=northeast" > Systemutil.Run bro,url > > browser("title:=.*").Sync > Wait 4 > DataTable.GetRowCount > for i=1 to 182 > > 'DataTable.GetRowCount > > Set mypage=browser("title:=.*").Page("title:=.*") > While mypage.WebElement("class:=iom-vehicle-column","index:="&i).exist > > Set desc4=description.Create > desc4("micclass").value="WebElement" > desc4("class").value="iom-vehicle-column" > Set obj1=browser("title:=.*").page("title:=.*").ChildObjects(desc4) > Msgbox obj1.Count > Datatable( "VehicleName", dtGlobalSheet > )=obj1(0).getroproperty("innertext") > > > Wend > > next > > -- -- 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 [email protected] 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 --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
