This API call only works in Try Script mode with the Visible client option enabled for Internet Explorer (Browser Application). This function enables step-by-step mode so the execution of a Try Script run is paused before the next API call is executed.
BrowserAPI.bdh
BrowserPause( );
benchmark SilkPerformerRecorder
use "Kernel.bdh"
use "BrowserAPI.bdh"
use "WebAPI.bdh"
dcluser
user
BDLTUser
transactions
TInit : begin;
TMain(BROWSER_MODE_DISPLAY_VISIBLE) : 1;
var
gDemoSite:string;
dclrand
dcltrans
transaction TInit
begin
gDemoSite := "http://demo.borland.com/InsuranceWebExtJS/";
end TInit;
transaction TMain(mode:number)
var
sQuote,sExpected : string;
begin
BrowserStart(BROWSER_MODE_DISPLAY_VISIBLE | BROWSER_MODE_USERBEHAVIOR_FIRST_TIME);
BrowserNavigate(gDemoSite, "Navigate to Demo Site");
if BrowserFind(HANDLE_DESKTOP , "//LABEL[@textContents='John Smith']", false, 0, true) = HANDLE_INVALID then
BrowserClick("//INPUT[@id='login-form:email']", BUTTON_Left);
BrowserSetText("//INPUT[@id='login-form:email']", "john.smith@gmail.com");
BrowserClick("//INPUT[@id='login-form:password']", BUTTON_Left);
BrowserSetText("//INPUT[@id='login-form:password']", "john");
BrowserButtonSelect("//INPUT[@id='login-form:login']", "BrowserButtonSelect (#1)");
BrowserClick("//IMG[@hideFocus='0'][2]", BUTTON_Left, "BrowserClick (#3)");
BrowserPause();
BrowserClick("//DIV[@textContents='Chrysler']", BUTTON_Left, "BrowserClick (#4)");
BrowserClick("//IMG[@hideFocus='0'][3]", BUTTON_Left, "BrowserClick (#5)");
BrowserClick("//DIV[@textContents='Aspen']", BUTTON_Left);
BrowserRadioButtonSelect("//INPUT[@id='autoquote:finInfo:0']");
BrowserButtonSelect("//INPUT[@id='autoquote:next']", "BrowserButtonSelect (#4)");
BrowserLinkSelect("//A[@textContents='Home']", "Select, A, textContents=Home (#1)");
BrowserButtonSelect("//INPUT[@id='logout-form:logout']",
"Select, INPUT, href=http://demo.borland.com/InsuranceWebExtJS/index.jsf (#1)");
end TMain;