Please show me how to use descriptive programming for WinListView.

34 views
Skip to first unread message

sarah...@gmail.com

unread,
Apr 11, 2018, 4:02:08 PM4/11/18
to QTP - HP Quick Test Professional - Automated Software Testing
Hi

I want to use descriptive programming for WinListView.  Windows("abc") is in the object repository.  The problem is that the dialog I'm working on has two WinListView objects.  I cannot use windows id or hwnd because I'm afraid they might change.   Both WinListView have almost same properties except “all items” are different.  However all items are on multi line.    Index or location are not working.



How can I write the following line for WinListView.  I've tried all of the of the following, they all fail. 

Window("abc").WinListView("nativeclass:=WinListView""all items:=Jane\n").Select "Joe"

Window("abc").WinListView("nativeclass:=WinListView""all items:=Jane.*").Select "Joe"

Window("abc").WinListView("nativeclass:=WinListView""all items:=Jane\n.*").Select "Joe"



 When I select the Property all items, following names are listed.

Jane

Joe

Grey

Hank



Thanks

 

automate...@gmail.com

unread,
Feb 10, 2019, 8:13:46 AM2/10/19
to QTP - HP Quick Test Professional - Automated Software Testing
Hi,

Were you able to solve below issue?

Just a guess, maybe below may help:

Set testWinList = Description.create()
'comment - may be try using 'micclass' instead of 'nativeclass' ?
testWinlist("nativeclass").value = "WinListView"
testWinlist("all items").value = ".*Jane.*"
Window("abc").WinListView(testWinlist).Select "Joe"

regards
Reply all
Reply to author
Forward
0 new messages