BrowserFormSubmit Function

Action

Submits a DOM form.

Include file

BrowserAPI.bdh

Syntax

BrowserFormSubmit( uTestObject : in union,
                   sTimer      : in string optional ): boolean;
Parameter Description
uTestObject Either a locator that identifies the DOM form or a handle to a previously found DOM form. Throws an error if an invalid handle is used or if the locator can not be resolved.
sTimer Optional: Name of the timer used for page measurements. If this parameter is omitted, no measurements are performed.

Return value

  • true if successful

  • false otherwise

Example

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
  begin
    BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
    BrowserNavigate("http://demo.borland.com/TestSite/common_main.asp#Common Forms");  
    BrowserSetText("//INPUT[@value='value1']", "John Smith");
    
    // submit the form by pressing <RETURN> in the solely input element of the form
    BrowserFormSubmit("//FORM[@method='get'][2]", "Submit, FORM, action=data2html.asp?Intermediate (#2)");
  end TMain;