06-25-2012, 11:12 AM
Try the below code
Code:
Dim myDeviceReplay
Set myDeviceReplay = CreateObject("Mercury.DeviceReplay")
rCnt = Browser("Works Information Management").Page("Works Information Management").Frame("Frame_\d").WebTable("html id:=fpsEstItems_viewport", "visible:=True","name:=fpsEstItems.*").GetROProperty("rows")
For i = 1 to rCnt
temp = Browser("Works Information Management").Page("Works Information Management").Frame("Frame_\d").WebTable("html id:=fpsEstItems_viewport", "visible:=True","name:=fpsEstItems.*").GetCellData(r,3)
If instr(1,temp, trim (Datatable.Value ("ItemCode",DtlocalSheet)) ,1) <> 0 Then
Set Tempeditbox = Browser("Works Information Management").Page("Works Information Management").Frame("Frame_\d").WebTable("html id:=fpsEstItems_viewport", "visible:=True","name:=fpsEstItems.*").ChildItem(r, 5, "WebElement",0)
Tempeditbox.FireEvent "onclick"
myDeviceReplay.SendString "This is my string"
myDeviceReplay.PressKey 28
End IF
Next