WCheckExists in Visual Test

WCheckExists in Visual Test

Post by tdaf.. » Fri, 03 Nov 2000 07:56:25



I am try to detect how many check boxes exist in a dialog, and then
check and uncheck them all.

My problem is that if I iterate through every ordinal, WCheckExists
returns true when the ordinal is a checkbox, and when it is a standard
button, or a button-like custom control.


does not exist.' (the seven is arbitrary)
It just so happens that this coincides with the WCheckUnCheck
statement, and the control is a custom button-like control that we use
as a color picker.

Dim i as long
i = 1
'Check Boxes
' Needs expansion
do while WCheckExists(_ord(i))
        WCheckCheck(_ord(i))
        WCheckUnCheck(_ord(i))
        i = i + 1
loop

I realize that there may be other approaches, but I really need one
that lets me iterate all the checkboxes in a dialog, without knowing
their names, or how many there are.

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

WCheckExists in Visual Test

Post by RWartn » Fri, 03 Nov 2000 11:10:36


Try using WCheckSetClass() to set the Check class to what is reported with
WInfo.  As I read your question WCheckExists can't differentiate objects.
Perhaps they are all seen as having the same class.

Send your VT questions here:

Email List Server:


subscribe    (in the subject line)

For a free book on VT visit:
http://members.aol.com/rwvtest/index.htm

>I am try to detect how many check boxes exist in a dialog, and then
>check and uncheck them all.

>My problem is that if I iterate through every ordinal, WCheckExists
>returns true when the ordinal is a checkbox, and when it is a standard
>button, or a button-like custom control.


>does not exist.' (the seven is arbitrary)
>It just so happens that this coincides with the WCheckUnCheck
>statement, and the control is a custom button-like control that we use
>as a color picker.

>Dim i as long
>i = 1
>'Check Boxes
>' Needs expansion
>do while WCheckExists(_ord(i))
>    WCheckCheck(_ord(i))
>    WCheckUnCheck(_ord(i))
>    i = i + 1
>loop

>I realize that there may be other approaches, but I really need one
>that lets me iterate all the checkboxes in a dialog, without knowing
>their names, or how many there are.


 
 
 

1. Visual Test 6 and Visual Basic 6 Application Testing

To all the VT6 experts,
        I am in a dilemma on a VB6 project.  I need to be able to get at
"Control Array Objects" on a form or Frame object on the form.  An
example would be a set of Textbox/Edit controls placed onto a Frame
Control.  They look like they are unique objects, but are not.
        My problem lies in two facets with Visual Test 6.  The first, the
Control Array objects Control ID can appear to be the same as another
control on the form (another Textbox/Edit control).  Thus when you try
to reference the object by Control ID, Visual Test becomes confused and
fails the function call.  Example, wEditExists("#10") will fail when an
Editbox Control Array exists on the form with the same Control ID (due
to the array and how VB creates the Control ID from the objects NAME
property at compile time, there is no way to hard code a Control ID
value in the objects properties at design time).  
        The second, is that the same thing happens for the Ordinal value of the
Control Array.  So I cannot get at it by Ordinal either.
        I discovered this while using the WINFO utility in VT6 and using the
Scenario Recorder to create some verification scripts (the only nice
feature in the Scenario Recorder and viable use of capture/playback).
My Scenario's would fail because VT6's Scenario Recorder would record
the Control Arrayed objects Text value as the objects identifier instead
of the Ordinal or associated label.
        Bottom line is this, it is killing me and my automation work.  I need
to quickly resolve this issue in order to use Visual Test 6 on this
project.  Otherwise I will have to find another viable solution (another
tool) or can the automation for the Smoke Tests.  I have worked with
other tools (QA Partner and ATF) on C projects.  VB is new to me as is
Visual Test.  HELP!

Thanks in advance.

Regards,
        Jim Hazen
        SQA Manager
        QuickStart Technologies

2. Anyone know WHY template parameter cannot be declared friend

3. Excel5.0 Visual Basic Add Ins ( Help)

4. Can I use the Equ. Edit. in W4w under WinOS2 (3.0)?

5. AD> Test Now 2.0 -- Add-on Tool for MS Test 3.0 and Visual Test 4.0

6. Added New NIC but can't use old IP

7. AD: Test Now 2.0 -- Add-on tool for Microsoft Test & Visual Test

8. Third party cdrom drive time-out loading miniroot

9. Visual C++ DLLs to use in Visual Test

10. Visual Test and Visual Basic interaction; is this possible ?

11. can visual test 6 use visual basic api's

12. Visual Basic with Visual Test

13. Upgrade Visual Basic 3.0 to Visual Basic 6.0 or Visual Basic.NET