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 21187 - JTextComponentOperator should throw exception when searched text not found
Summary: JTextComponentOperator should throw exception when searched text not found
Status: CLOSED FIXED
Alias: None
Product: qa
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: issues@qa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-05 14:29 UTC by Jiri Skrivanek
Modified: 2011-02-17 09:32 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 Jiri Skrivanek 2002-03-05 14:29:12 UTC
Some methods use getPositionByText() method to identify start position and then
they try to change caret position. If the text is not found, method
getPositionByText() returns -1 and caret starts to trying reach -1 position.
It would be better if JemmyException is thrown from methods below when text is
not found.

public void changeCaretPosition(String text, int index, boolean before)
public void selectText(String text, int index)
Comment 1 Alexandre Iline 2002-03-08 11:55:53 UTC
Now changeCaretPosition and selectText methods throws NoSuchText 
exception - subclass of JemmyException.

Comment 2 Jiri Skrivanek 2002-03-11 08:50:44 UTC
Verified.