Resets the browser state (cookies, cache and history).
BrowserAPI.bdh
BrowserReset( nMode : in number optional ): boolean;
Parameter | Description |
---|---|
nMode | Optional: Configures virtual user behaviour and browser visibility. The following constants may be used:
|
true if successful
false otherwise
benchmark SilkPerformerRecorder use "Kernel.bdh" use "BrowserAPI.bdh" dcluser user VUser transactions TInit : begin; TMain : 1; var dclrand dcltrans transaction TInit begin end TInit; transaction TMain var sHost : string; nPort : number; begin BrowserStart(BROWSER_MODE_USERBEHAVIOR_REVISITING, 800, 600); // get the standard host name & port and print them BrowserGetStandardHost(sHost, STRING_COMPLETE, nPort); print("Standardhost: '"+sHost+"'"); print("Port: '"+string(nPort)+"'"); // set the standard host name to demo.borland.com and port to 80 BrowserSetStandardHost("demo.borland.com",80); // navigate to demo.borland.com on port 80 BrowserNavigate("http://standardhost"); // set the standard host name to www.google.com and port to 80 BrowserSetStandardHost("www.google.com"); // reset the browser state BrowserReset(BROWSER_MODE_USERBEHAVIOR_FIRST_TIME); // navigate to www.google.com BrowserNavigate("http://standardhost"); // revert to previous state BrowserSetStandardHost(sHost, nPort); end TMain;