Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to handle WinListView object with multi line items?
#2
Not Solved
I wrote a loop to to put the values in "all items" in the WinListView object above into an array and then loop through and compare to a parameter in the datatable. The loop works correctly for the value in the first row but then next time it loops through i get: Subscript out of range: 'p'

Can anyone help me with this? Here is my code-

Code:
Get number of Rows (for Loop) and  Info
TECH_ROWS = window("Workforce Management").Window("R&D").WinListView("Techs").GetROProperty ("items count")
TECH_ITEMS = window("Workforce Management").Window("R&D").WinListView("Techs").GetROProperty ("all items")

'Split  Tech Info in to an Array
TECH_SPLIT = split(TECH_ITEMS, "All ")
TECH_INFO = split(TECH_SPLIT(0), "None Selected")

'Loop a MSGBOX for every Array value
For p = 0 to TECH_ROWS -1
        msgbox "Tech Found on Row " & p +1 & " is: " & Trim(TECH_INFO(p))
        
        'Job matching from Datasheet and values in Array
        If TechID = Trim(TECH_INFO(p)) Then
                msgbox "Tech = " & TechID & vbCr & "Row Found on Screen = " & Trim(TECH_INFO(p))
        End If
Next
Reply


Messages In This Thread
RE: How to handle WinListView object with multi line items? - by jim7020 - 06-11-2008, 10:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Can UFT Handle Detecting Redirects? zunebuggy 0 782 05-28-2020, 06:50 PM
Last Post: zunebuggy
  Not able to get the list of items in Delphi Combobox Environment Object Raj Aryan Singh 3 1,959 02-04-2020, 12:32 AM
Last Post: Raj Aryan Singh
  Fifth word from every thousand line in notepad files. sallu.iet@gmail.com 0 850 01-17-2020, 09:58 AM
Last Post: sallu.iet@gmail.com
  Grab multiple line data from log file haziqwebs 0 1,707 10-19-2016, 01:28 PM
Last Post: haziqwebs
  [UFT] [WPF] DataGrid: get items of ControlTemplate robertosalemi 0 3,293 07-14-2016, 07:52 PM
Last Post: robertosalemi

Forum Jump:


Users browsing this thread: 1 Guest(s)