Creates a file download cancel command in the dialog command storage. If a file download is triggered by one of the following API calls, for example BrowserClick, the download is canceled and no data is downloaded. The behavior of BrowserDlgDownloadCancel is similar to BrowserDlgDownload, but cancels the download instead of performing it.
BrowserAPI.bdh
BrowserDlgDownloadCancel(): boolean;
true if successful
false otherwise
benchmark SilkPerformerRecorder use "Kernel.bdh" use "BrowserAPI.bdh" dcluser user VUser transactions TMain : 1; dcltrans transaction TMain var wnd1 : number; begin BrowserStart(BROWSER_MODE_DEFAULT, 800, 600); BrowserNavigate("http://demo.borland.com/TestSite/common_main.asp#Download", "Navigate_http://demo.borland.com/TestSite/common_main.asp#Download (#1)"); wnd1 := BrowserGetActiveWindow("wnd1"); BrowserDlgDownloadCancel(); BrowserClick("//A[@textContents='Small File']", BUTTON_Left, "Click, A, textContents=Small File (#1)"); BrowserDlgStop(); end TMain;