Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetROProerty not working in subsequent iterations
#1
Not Solved
Hello, I am new to QTP and having an issue with GetROProperty. Is this what I should use in this situation or is there someting better than GetROProperty. I am using QTP11 with IE7.

The following code works fine as as long as the list box does not change.

Code:
Browser("Certificate Error: Navigation_2").Page("Page_9").Link("Profile Classes").Click
Browser("Certificate Error: Navigation_2").Page("Page_3").WebList("classes").Select "User"
Browser("Certificate Error: Navigation_2").Page("Page_3").Image("P_01-over").FireEvent "onmouseover"
Browser("Certificate Error: Navigation_2").Page("Page_3").Image("P_01-over").Click
sItemsInUserList=Browser("Browser").Page("Page").WebList("prfid").getroproperty("all items")
If instr(1,sItemsInUserList,sUser) > 0 Then
    bQTPUserExists=True
Else
    bQTPUserExists=False
End If

When the list box has change since the last iteration, the following error is dispayed. I am attempting to check the existence of a user, prior to adding a new one.

Cannot identify the object "prfid" (of class WebList). Verify that this object's properties match an object currently displayed in your application.

Line (94):
Code:
"sItemsInUserList=Browser("Browser").Page("Page").WebList("prfid").getroproperty("all items")".
Reply
#2
Not Solved
When the error occurs open the repository and higlight the object in the app. Does it throw the same error when you use that option? If yes, spy and find out what property is changing?
Let me know if you need more info.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Not Solved
The Object Repository give me the same error.

It shows under test objects
Browser
page
prfid


The Object SPy shows:

Browser
page
WebTable: Number of Profiles: 12822
Weblist: prfid

I think the only difference is the prior version would have had 12821 profiles.
Reply
#4
Not Solved
After you get tge error, add that weblist into the repository and see which property has changed from the first one. There definitely is a change either in the name property.
We may have to regular expression the property change. Please update the outcome.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Repeat iterations Until New Value Is Seen in Column1 shayk1985 1 1,743 07-05-2018, 05:52 PM
Last Post: Ankur
  UFT Datatable iterations Studymode 2 3,788 12-12-2017, 11:10 PM
Last Post: Studymode
  QTP-Re-executing script after completion of all iterations JwalantBhatt0602 1 2,696 03-24-2016, 12:37 AM
Last Post: JwalantBhatt0602
Question QTP not performing iterations based on local data sheet Breaker 18 56,759 01-25-2016, 04:32 PM
Last Post: arunshuklainbox
  How To use iterations for API petchd 1 2,798 12-03-2015, 06:51 PM
Last Post: petchd

Forum Jump:


Users browsing this thread: 1 Guest(s)