01-01-2009, 12:16 PM
Hi kkishore12345,
Try with the following procedure:
First of All, Store all required test data in Datatable(Global or Local Sheet) & then In File Menu --> Settings --> Run Tab --> Choose "Run On only One Iteration" Option) :
Try with the following procedure:
First of All, Store all required test data in Datatable(Global or Local Sheet) & then In File Menu --> Settings --> Run Tab --> Choose "Run On only One Iteration" Option) :
Code:
rc=Datatable.GetSheet("Global").GetRowCount
For i=1 to rc ' Start of Main Loop
Datatable.GetSheet("Global").SetCurrentRow(i)
Browser("browser").Page("Page1").link("Create New Account").Click
Browser("browser").Page("Page2").link("Continue").click
Expected_DOB=trim(Datatable("DateOfBirth",dtglobalSheet))
Browser("browser").Page("Page3").Weblist("Date Of Birth").Select Expected_DOB
Expected_country=trim(Datatable("countries",dtglobalSheet))
country_Count=Browser("browser").Page("Page3").Weblist("Country").GetROProperty("Items Count")
For j=1 to country_Count
Actual_country=trim(Browser("browser").Page("Page3").Weblist("Country").GetItem(j))
if (Expected_country=Actual_country) then
Browser("browser").Page("Page3").Weblist("Country").Select j
Exit for
end if
Next
Expected_Language=trim(Datatable("IELangPref",dtglobalSheet))
Languages_Count=Browser("browser").Page("Page3").Weblist("Languages").GetROProperty("Items Count")
For k=1 to Languages_Count
Actual_Language=trim(Browser("browser").Page("Page3").Weblist("Languages").GetItem(k))
if (Expected_Language=Actual_Language) then
Browser("browser").Page("Page3").Weblist("Languages").Select k
Exit for
end if
Next
Browser("browser").Page("Page3").link("Continue").click
Browser("browser").Page("Page4").link("Master Account").click
' Navigate Back to Page1
Next ' End of Main Loop