12-08-2010, 06:24 PM
Try modifying your code as follows:
PHP Code:
Dim condition
condition = 0
row = DataTable.GetSheet("Global").GetCurrentRow
Browserpage.Link("name:=1").Click ' Clicks the first page'
EmailId = DataTable.GetSheet("Global").GetParameter("EmailId").ValueByRow(row)
Pages = 3 ' getting during the run time '
For i = 1 to pages
count = 5 ' getting during the run time'
For j = 2 to count
Tablelink = gridlist(3).GetCellData(j,1) ' getting during the run time'
If Trim(EmailId) = Trim(Tablelink) Then
EmailID.Click
Update.Click
condition = 1
Exit For ' the control should exit from the inner loop'
End If
Next
If (condition = 1) Then
Exit For ' the control should exit from the Outer loop and goes to the first line of code.'
End If
Browserpage.Link("name:=Next").Click ' Clicks the next page.
Next