10-04-2011, 06:09 AM
He, I writing an qtp script to add users based on a input excel file. The script checks is the user exists and/or if the users contact info exist. If either exists, it writes an exception messages. If the user and contact info does not exist it should add the user and contact info. The problem I have is that it works when adding the first user, but does not when adding a subsequent user. I get the following error message:
Can't identify the object "prfid" (of class weblist). Verify the object matches properties of an object currently displayed in your application.
line 113 "sItemsInUserList=Browser("Browser").Page("Page").WebList("prfid").getroproperty("all items")"
Here is the code. Did add a user change something? The repository should have been recorded many months ago and the first add should have an issue as well, but to new to QTP. Any ideas on how to resolve?
Can't identify the object "prfid" (of class weblist). Verify the object matches properties of an object currently displayed in your application.
line 113 "sItemsInUserList=Browser("Browser").Page("Page").WebList("prfid").getroproperty("all items")"
Here is the code. Did add a user change something? The repository should have been recorded many months ago and the first add should have an issue as well, but to new to QTP. Any ideas on how to resolve?
Code:
'Let check if User exists
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