11-18-2011, 08:03 PM
Hi Subha,
In the above code u need not to have the month and year field. The script is fetching the system month,day,year in order to create a unique customer number.
However, as u said u have set of customers in the datatable, u can use the below code in case of error
'Your code goes here
Regards,
Ankesh
In the above code u need not to have the month and year field. The script is fetching the system month,day,year in order to create a unique customer number.
However, as u said u have set of customers in the datatable, u can use the below code in case of error
'Your code goes here
Code:
intCurrentRow= Datatable.GetSheet(<SheetName>).GetCurrentRow
Do
Datatable.GetSheet(<SheetName>).SetCurrentRow intCurrentRow
strCustomer=Datatable(“<ColumnName>”,<SheetName>)
Browser("<BrowserName>").Page("<PageName>").WebEdit("<EditBoxName>").Set strCustomer
Browser("<BrowserName>").Page("<PageName>").WebButton("<Add Customer Button Name>").click
'chk if error exist
if <Error Window>.Exist Then
<Error Window>.close
intCurrentRow= Datatable.GetSheet(<SheetName>).GetCurrentRow
intCurrentRow= intCurrentRow+1
End IF
Loop While <Error Window>.Exist
Regards,
Ankesh