Common Scripts and Functions
The scripts have some common functions that are accessible through the Global Host object.
To learn more about the common functions, see the table below:
Subtype | Function (HOST object) | Input Parameters (Type) | Return Type | Description |
---|---|---|---|---|
Tracing |
|
ByVal msg (String) | Boolean | Writes a trace log that is useful for debugging in the test bench. |
Data Conversion |
|
ByVal msg (Object) |
|
Converts all data to a string and handles |
|
ByVal msg (String) | Encodes the string. | ||
|
ByVal msg (String) | Decodes the string. | ||
External Data
|
RunStringRequest( )
|
ByVal url (String) ByVal username (String) ByVal password (String) |
|
Executes an HTTP Get operation and returns the string result. |
RunStringRequest2()
|
ByVal url (String) ByVal cookie (String) ByVal username (String) ByVal password (String) |
Executes an This function also supports cookie authentication. |
||
RunByteRequest()
|
|
Executes an HTTP Get operation and returns the binary result. |
||
RunByteRequest()
|
Executes an This function also supports cookie authentication. |
|||
Utility Methods |
PersistContentValue()
|
ByVal key (String) ByVal value (String) |
String |
Saves a value during a session. A session is an enumeration call, item call, or security sync. |
GetPersistContentValue()
|
ByVal key (String) |
Gets a value during a session that was saved during A session is an enumeration call, an item call, or a security sync. |
||
ResolveMimeType()
|
ByVal mime (String) | Resolves a mime type to a file extension. | ||
GetTempFilePath()
|
ByVal extension (String) | Gets a temp file name and uses this name for copying the file for indexing. | ||
GetLockableObject()
|
|
Object |
Gets an object that is global for a content source. This function can also be used for locking. |