Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot identify the specified item of the regions object.
#3
Solved: 11 Years, 4 Months ago
One problem I see (but not the cause of your crash) is that in your loop, "i" starts at "1". Then you set "itemname" to ...GetItem(i+1), so the first element you get is element #2; item #1 gets ignored. Maybe that's by design.

It sound to me like it is getting a value via "GetItem(i+1)" that cannot be selected in the next line for some reason. I ran your code on our test web site on a couple of different dropdowns and it worked OK.

To help you find the error, try changing your code to work like this until you find the problem:

.................
Code:
For i = 1 To ListSize-1
Itemname =Browser("MLSListings.com").Page("MLSListings.com").WebList("regions").GetItem(i+1)
Err.Number=0
On Error Resume Next
Browser("MLSListings.com").Page("MLSListings.com").WebList("regions").Select Itemname
If Err.Number <> 0 Then
    x=1
End If
.................

and set a breakpoint on the line "x=1". When the debugger breaks on that line, you can examine "Itemname" and see what it is. It sounds like when this happens that the value for "Itemname" is not on the list for some reason.
Reply


Messages In This Thread
RE: Cannot identify the specified item of the regions object. - by tdevick - 07-29-2011, 11:16 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot identify the specified item Beginner 0 2,487 06-22-2017, 04:55 PM
Last Post: Beginner
  Cannot identify the object "Webtable" korunu 1 2,543 06-29-2016, 05:28 PM
Last Post: Ankesh
  Cannot identify the object "Webtable" korunu 0 1,808 05-11-2016, 12:02 AM
Last Post: korunu
  WinListView set item command Shahino007 0 2,652 10-06-2015, 03:57 PM
Last Post: Shahino007
  QTP "Cannot identify the object" richardpaulhall_2 3 13,582 08-20-2015, 11:46 PM
Last Post: ADITI1992

Forum Jump:


Users browsing this thread: 1 Guest(s)