Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to enter data in web table
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
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:

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


Attached Files Image(s)
   
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
HI Ramesh,

Try this below code.

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"
Tempeditbox.WebEdit("index:=0").Set "15"
End IF
Next

Thanks,
SUpputuri
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi SUpputuri,
This Solution not worked. It is helpful to me if i get any other solution.
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi All,
I am also facing a serious problem in one of my web application that i can't enter data in any one my cell in the table.
Attaching the Screen shot, Object spy.

I used this code:

Code:
rowcnt = Browser("name:=Automatic Building Plan Approval System").Page("title:=Automatic Building Plan Approval System").Frame("html id:=IframeExtract", "html tag:=IFRAME", "title:=PlotExtract").WebTable("html id:=fpExtracts_viewport", "html tag:=TABLE", "name:=fpExtracts:0,5").RowCount

colcnt = Browser("name:=Automatic Building Plan Approval System").Page("title:=Automatic Building Plan Approval System").Frame("html id:=IframeExtract", "html tag:=IFRAME", "title:=PlotExtract").WebTable("html id:=fpExtracts_viewport", "html tag:=TABLE", "name:=fpExtracts:0,5").ColumnCount

For r = 1 to rowcnt

    For c = 1 to colcnt

               Set Tempeditbox = Browser("name:=Automatic Building Plan Approval System").Page("title:=Automatic Building Plan Approval System").Frame("html id:=IframeExtract", "html tag:=IFRAME", "title:=PlotExtract").WebTable("html id:=fpExtracts_viewport", "html tag:=TABLE", "name:=fpExtracts:0,5").ChildItem(r,c,"WebElement",0)
        Tempeditbox.Click
        Tempeditbox.WebEdit("index:=0").Set "1"
        
        Next

Next

I even tried this code also at least to enter data in one cell

Code:
Set Tempeditbox = Browser("name:=Automatic Building Plan Approval System").Page("title:=Automatic Building Plan Approval System").Frame("html id:=IframeExtract", "html tag:=IFRAME", "title:=PlotExtract").WebTable("html id:=fpExtracts_viewport", "html tag:=TABLE", "name:=fpExtracts:0,5").Object.Rows(1).Cols(2)

Tempeditbox.Click
Tempeditbox.Set "1"


Attached Files Image(s)
   
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
HI Ankur,
Can i request your help regarding this post!!!!
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi All,
I am waiting for solution for my problem mentioned above. Can anyone post a good reply to me?
Reply
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
try sending the value by using device replay.
Thanks,
SUpputuri
Reply
#8
Solved: 11 Years, 3 Months, 3 Weeks ago
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

Reply
#9
Solved: 11 Years, 3 Months, 3 Weeks ago
Thankyou,
This solved the purpose. But is it a permanent solution?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with Select checkbox from data table value jayraocourts 0 1,244 11-01-2019, 10:25 PM
Last Post: jayraocourts
  Can QTP handle slick grid table in a web page qtplearner88 2 4,491 10-01-2019, 10:44 AM
Last Post: shilpi952
  unable to rowcount in web table manoj84monu 1 2,905 06-13-2016, 04:46 PM
Last Post: Anu1234
  Fetching values from a web table qapandit 7 9,255 05-30-2014, 02:32 PM
Last Post: nistalaramesh
  Facing issue with Java Table to press Enter Key from Keyboard Nasir Ahmed 0 4,530 05-23-2014, 08:05 PM
Last Post: Nasir Ahmed

Forum Jump:


Users browsing this thread: 3 Guest(s)