Hi Tushar,
I hope this will help you.
I hope this will help you.
Code:
Dim sFileLocation
On Error Resume Next
SystemUtil.CloseProcessByName "Excel.Exe"
sFileLocation = "C:\Input.xls"
sWorksheet = "InputData"
Set xlObj = CreateObject("Excel.Application")
xlObj.Visible = True
Set xlWorkBookObj = xlObj.Workbooks.Open(sFileLocation)
Set xlWorkSheetObj = xlWorkBookObj.Worksheets(sWorksheet)
For i =2 To 3
sRollNo = xlWorkSheetObj.Cells(i,1)
Browser("ConfirmationHome").Page("ConfirmationHome").WebEdit("trfrBpId").Set sRollNo
Browser("ConfirmationHome").Page("ConfirmationHome").WebButton("Search").Click
If Browser("ConfirmationHome").Page("ConfirmationHome").Link("DRN").Exist Then
xlWorkSheetObj.Cells(i,2).Value = "Pass"
Else
xlWorkSheetObj.Cells(i,2).Value = "Fail"
End If
Next