Non-Component Locators (NCLs) are objects of the nonComponentLocator
class. This class contains two methods--findObject()
and getNamedObjectData()
--that you implement with code specific to the toolkit you are using.
This section describes:
Recording with a non-component locator
As you record a script, JavaStar monitors your interaction with the application under test. If you defined your test to use an NCL as you record, the test is recorded using the procedure:
Component
(the parent deriving from the JavaAWT library) and the AWTevent
.
Component
and AWTevent
to the NCL
findObject(Component, AWTevent)
.
findObject()
identifies the non-component as an object of the toolkit, retrieves the location of the object, then determines how best to refer to this object using a String.
JSNCLData
object.
Running a test with a non-component locator
getNamedObjectData()
method for the NCL. It passes the Component and the String referencing the non-component, as provided by the test code.
getNamedObjectData()
performs the reverse operation as findObject()
--it uses the String passed in as an argument to determine the location (coordinates) of the object.
getNamedObjectData()
sends the location information back to JavaStar inside an NCLData
object.
Send feedback to
JavaStar-feedback@suntest.com
Copyright © 1998
Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, CA 94303.
All rights reserved.