Finding items without names

View: New views
2 Messages — Rating Filter:   Alert me  

Finding items without names

by todd runstein :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have an existing application that I'd like to add
unit test on before I start changing the code (just to
make sure I don't break anything).  It contains an
array of "widgets", each of which contains a
JComboBox, a JTextField and a JCheckbox.  None of
these have names.  In fact, none of the components in
this application are named.

Is there a way to write a scenario that locates the
JComboBoxes or JTextFields and selects one based on an
index (like, give me the "0" JComboBox)?  It seems
like if I'm testing an application that doesn't have
names, I'm pretty limited on how the Finders work.  

Am I missing something?  What options do I have?

Thanks,

Todd

The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
Get a handle on your data with "pocOLAP", the "little" OLAP project
http://pocolap.sourceforge.net
________________________________________

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Finding items without names

by Nobuhiko YASUNAKA :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

todd runstein wrote:
> Is there a way to write a scenario that locates the
> JComboBoxes or JTextFields and selects one based on an
> index (like, give me the "0" JComboBox)?  It seems
> like if I'm testing an application that doesn't have
> names, I'm pretty limited on how the Finders work.  

See COMPONENT_NUMBER.
I think it will match to your case.

--
----------------------------------------------------
Nobuhiko YASUNAKA

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price