When you record a class,
Silk Test Classic checks for and resolves naming conflicts that arise between
4Test methods and the supported native methods. When naming conflicts arise, make sure you call the appropriate method in your test scripts. The following table shows how
Silk Test Classic resolves the naming conflicts:
Type of Naming Conflict
|
How
Silk Test Classic Resolves the Conflict
|
overloaded native methods
|
Appends "_n" to overloaded method names to ensure that each is unique, where n is an integer that starts at 2.
|
native method has the same name as a
4Test method
|
Prefixes the letter "x" to the name of the native method.
For ActiveX/Visual Basic methods only,
Silk Test Classic prefixes an underscore character (_) to native methods that begin with "set" and "get" in order to distinguish them from the Get and Set methods that
Silk Test Classic constructs from properties.
|
native method uses a reserved
4Test keyword in an inappropriate context
|
Prefixes the letter "x" to the name of the native method.
|
When
Silk Test Classic prefixes the letter "x" to the name of a native method or property, it also adds the
alias keyword with the original name of the native method.
Example: Resolve Conflicts for Overloaded Methods
Overloaded Method
|
How
Silk Test Classic Resolves the Conflict
|
obj void wait( int i1 )
|
obj void wait( int i1 )
|
obj void wait( int i1, int i2 )
|
obj void wait_2( int i1, int i2 )
|
obj void wait()
|
obj void wait_3()
|
Example: Resolve Naming Conflicts Between
4Test and Native Java Methods
4Test Method
|
Native Java method
|
getName()
|
getName() -> xgetName()
|
isEnabled()
|
isEnabled() -> xisEnabled()
|
Example: Resolve Naming Conflicts Between
4Test Reserved Words and Native Java Methods
4Test Reserved Word
|
Native Java method
|
LIST data type
|
list() -> xlist()
|
select statement
|
select() -> xselect()
|