Ranorex

Multiple controls of same class type

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython
View previous topic :: View next topic  
Author Message
James Hirst



Joined: 06 Dec 2006
Posts: 21
Location: UK

PostPosted: Thu Mar 29, 2007 8:25 pm    Post subject: Multiple controls of same class type
Hi,

I'm attempting to automate a UI with multiple comboboxes - the problem is that using FormFindChildClassName (which I'm stuck with on the Windows Display Porperties dialog) will just find the first one - using FormFindChildClassName(hWnd, 'ComboBox #1') and FormFindChildClassName(hWnd, 'ComboBox #2') makes no difference!

To put it into context I'm automating the Display and Color Quality comboboxes on the Settings property page of the Desktop Properties dialog.

Any assistance appreciated!

Thanks,
James
Back to top
View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 05 Jul 2006
Posts: 351

PostPosted: Thu Mar 29, 2007 9:30 pm    Post subject:
You should use the instance number as the third parameter and not in the class name:

Code: click into code to enlarge
# Find the second combo box
FormFindChildClassName(hWnd, 'ComboBox', 2)


Quote:
To put it into context I'm automating the Display and Color Quality comboboxes on the Settings property page of the Desktop Properties dialog.


I think it would be better to use the FrmFindChildControlId function, the ControlId is a unique identifier in this dialog.

Jenö Herget
Ranorex Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexPython All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum