06-07-2012, 05:25 PM
Hi All,
I am having big problem on entering data in to a web table.
I will provide the screen shot as well as spy for the object.
Please help me on how to overcome this problem.
I am using QTP-11, The Web Application is Developed in .Net
My script is not entering value in the Cells It is just highlighting the cell.
My Script:
I even tried this code also.
I am having big problem on entering data in to a web table.
I will provide the screen shot as well as spy for the object.
Please help me on how to overcome this problem.
I am using QTP-11, The Web Application is Developed in .Net
My script is not entering value in the Cells It is just highlighting the cell.
My Script:
Code:
For r = 1 to Browser("Works Information Management").Page("Works Information Management").Frame("Frame_\d").WebTable("html id:=fpsEstItems_viewport", "visible:=True","name:=fpsEstItems.*").RowCount
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.Click
Tempeditbox.Set "15"
End IF
Next
I even tried this code also.
Code:
Set obj = 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)
Set collection = Browser("Works Information Management").Page("Works Information Management").Frame("Frame_\d").WebTable("html id:=fpsEstItems_viewport", "visible:=True","name:=fpsEstItems.*").ObjectsByMicClass("WebElement")
wait(stdWait+ 1)
For i=1 to collection.count
If (collection(i).GetROProperty("outertext") = "0.000") Then
collection(i).Set DataTable.Value("Qty")
Exit for
End If
Next