Configuring host names
To record your script with a standard host configured in SilkPerformer, follow this procedure:
- Choose Settings > Active Profile to open the Profile Internet dialog box.
- In the left navigation pane, click Record.
- In the left navigation pane, click Internet.
- Click the Hosts tab.
The Profile dialog box should look similar to the dialog box in the following figure.
(Click the image to expand it.)
- Enter the host name and the port number of your web server.
- Click OK, and save the project.
Now, when you record a script, SilkPerformer inserts the word
standardhostin place of your web server host and port number.
When you replay the script, SilkPerformer reads the values from this configuration.
To override these values, use the
WebSetStandardHost function in your script. Any configuration that is set in the script takes precedence over a configuration in SilkPerformer.
The recommendation is to put the configuration in the script and in a central area such as the header. Therefore, to set a host name, use
WebSetStandardHost in your
fInitialization function. This enables you to view your host name and port number values in one place:
function fInitialize begin WebSetBrowser(WEB_BROWSER_MSIE6); WebSetStandardhost(gsWebServer, gsWebServerPort); RemedyInit(); RndSeed(GetUserId()); end fInitialize;