Action
The
Silk4JInit function loads the JVM and
Silk4J is set up. This function is used only for web application testing (but not for mobile) and does not start a new session.
Therefore, you need to enable
Use particular user account in the system settings: Click
and enable the option. All started virtual users are using the same
Silk Test process within the current session.
注: Browser type settings defined using this function override profile settings that were configured in the profile settings:
. When the optional
uBrowserType parameter is omitted, the profile settings are used. The default browser type is the one that was specified during the import
of the test.
Include file
SilkTest.bdh
Syntax
Silk4JInit( uBrowserType : in number optional := BROWSER_TYPE_DEFAULT ): boolean;
Return value
-
true if successful
-
false otherwise
Parameter
|
Description
|
uBrowserType
|
Optional: Sets the browser type. Possible values are:
- BROWSER_TYPE_DEFAULT := 0;
- BROWSER_TYPE_CHROME := 1;
- BROWSER_TYPE_FIREFOX := 2;
- BROWSER_TYPE_PHANTOMJS := 3;
|
Example
dcltrans
transaction TInit
begin
Silk4JInit();
end TInit;
transaction TTest
begin
Silk4JExecuteTestcase("com.borland.silk4j.TestClass", "testMethod", "method testcase");
end TTest;