QARun - ListBox - ListItem
I am testing an application in XP using QARun.
The object is 'ListBox' and I need to record / get the ListItems. I am able to count the number of rows in ListBox as well as I can select the list item with 'SingleClick / doubleclick'. But I need to get the data information being displayed as a ListItem in a variable.
One row(ListItem') shows 'Sr No, StartDate, EndDate, Barcode, ....etc)
4 01/01/2007 31/03/2007 436789 ABC
7 11/01/2007 28/04/2008 836386 XYZ
My requirement is to get / record the 'Barcode' (e.g in above data - 436789 / 836386) in one variable. But when I am trying to get the ListItem it gives just a 'Square' icon and when I am trying to check the length of the captured information it just gives '1'.
Please suggest me how to get the ListItem in a variable from a ListBox.
Seeking for an [stupid is as stupid does] help.
Re: QARun - ListBox - ListItem
It's been a while since I have really used QARun other than as an attempt to help people here but the problem could be that the control is Owner Drawn in which case you will not likely be able to get the text without using the DLLFunc command which may still have drawbacks. Another problem could be that I don't remember QARun being able to pull back more than the first column of data in a multi-column list.
If you are not familiar with the DLLFunc command, it allows you to make calls to exposed functions in system dlls that are commonly used to provide information to applications. In most cases all function calls need a window handle to the control that you want to get information from. It is very similar to declaring a dll function in VBA and then calling it, but has a limitation in that it cannot handle structures. You can however create a wrapper dll with an exportable function in which you can call with qarun. The wrapper function will then do all the dirty work and send QARun back the needed data.