Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help on - Handle Runtime object in QTP
#1
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
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
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
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 5,242 10-01-2019, 10:44 AM
Last Post: shilpi952
  How to Handle Modal Dialogs In QTP Jyobtech 0 2,898 07-22-2015, 01:22 AM
Last Post: Jyobtech
  webfile web object not identified at runtime in a java application saila123 1 3,320 02-11-2015, 08:23 PM
Last Post: Kirill
  How to handle KeyUp Event used in my App Hpqtp 3 4,747 07-03-2014, 05:25 AM
Last Post: supputuri
  Runtime Object Identification Problem qapandit 9 7,704 07-02-2013, 04:14 AM
Last Post: qapandit

Forum Jump:


Users browsing this thread: 1 Guest(s)