This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 39633 - Jemmy Should provide the functionality to click a button with an Icon without.
Summary: Jemmy Should provide the functionality to click a button with an Icon without.
Status: CLOSED INVALID
Alias: None
Product: qa
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@qa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-05 11:56 UTC by Mayank
Modified: 2011-02-17 09:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mayank 2004-02-05 11:56:29 UTC
Jemmy Should provide the functionality to click a 
button with an Icon. I am making an automation 
tool which require Jemmy to click on a Button 
that has an Icon and has no title. Can any one 
tell me how can I find a button that has a image 
but no text. I don't even know the container of 
the button.
Comment 1 Jiri Skrivanek 2004-02-05 16:45:56 UTC
You have to know the container of the button. At least you have to
find a frame or a dialog in which this button resides. Then you can
find a button by several criteria and also you can implement its own
ComponentChooser with custom condition. For example,

  JFrameOperator contOper = new JFrameOperator();
  JButtonOperator buttonOper = new JButtonOperator(contOper, index);

finds index-th button in given container. Or

  JButtonOperator buttonOper = new JButtonOperator(contOper, new
ComponentChooser() {
            public boolean checkComponent(Component comp) {
                String tooltip = ((JButton)comp).getToolTipText();
                if(tooltip!=null) {
                    return tooltip.equals("My Tooltip");
                } else {
                    return false;
                }
            }
            
            public String getDescription() {
                return "tooltip equals to My Tooltip";
            }
        }
        );

finds a button with tooltip equals to "My Tooltip" string.

So, I suppose this is not a bug. Jemmy can find components by several
ways. Please, next time ask similar questions at the
users@jemmy.netbeans.org mailing list. There is a community of users
which is willing to help you.