Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help on - Handle Runtime object in QTP
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
I have a .net page which have runtime generated webedit fields.Actually i don't know anything about it before running the application.I need to change the value of these runtime webedit field.
I tried to use this code,but shows error object not registered.

Code:
Set Desc = Description.Create()
Desc("micclass").Value = "WebEdit"
Set Edits = Browser("Repsmart Data Centre").Page("RDC Product").Frame("popupFrame_3").ChildObjects(Desc)
MsgBox "Number of Edits: " & Edits.Count
Max = Edits.Count -1

For x = 1 to Max

detail=Edits(x).GetROProperty("Name")
Browser("Repsmart Data Centre").Page("RDC Product").Frame("popupFrame_3").WebEdit(detail).Set "17.50"

next
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi
sorry Saket...As i am not able to post reply in tag...here i am replying the post in independent tag.

1. There may be multiple webedits in that screen, so you have to provide additional property.
AND/OR
2. Try the script for loop as:
Code:
For x = 1 to Max
  Edits(x).Set "17.50"
next
Set Desc = Description.Create()
Desc("micclass").Value = "WebEdit"
Set Edits = Browser("Repsmart Data Centre").Page("RDC Product").Frame("popupFrame_3").ChildObjects(Desc)
MsgBox "Number of Edits: " & Edits.Count
Max = Edits.Count -1
For x = 1 to Max
  Edits(x).Set "17.50"
next
Reply
#3
Solved: 10 Years, 8 Months, 4 Weeks ago
Hi,

Here you are fetching the Name property of an WebEdit but the way you are passing it is Not correct.

Please Replace
Code:
Browser("Repsmart Data Centre").Page("RDC Product").Frame("popupFrame_3").WebEdit(detail).Set "17.50"

By
Code:
Browser("Repsmart Data Centre").Page("RDC Product").Frame("popupFrame_3").WebEdit("Name:="&detail).Set "17.50"

and Try.

If possible please attach a snapshot.
Reply
#4
Solved: 10 Years, 8 Months, 4 Weeks ago
Thanks kavita.This code worked fine.Thanks for all members who tried to reply and help me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can QTP handle slick grid table in a web page qtplearner88 2 4,277 10-01-2019, 10:44 AM
Last Post: shilpi952
  How to Handle Modal Dialogs In QTP Jyobtech 0 2,329 07-22-2015, 01:22 AM
Last Post: Jyobtech
  webfile web object not identified at runtime in a java application saila123 1 2,651 02-11-2015, 08:23 PM
Last Post: Kirill
  How to handle KeyUp Event used in my App Hpqtp 3 3,693 07-03-2014, 05:25 AM
Last Post: supputuri
  Runtime Object Identification Problem qapandit 9 5,896 07-02-2013, 04:14 AM
Last Post: qapandit

Forum Jump:


Users browsing this thread: 1 Guest(s)