Verifies that a DOM element has a specified caption. The logic of this function works as follows:
BrowserAPI.bdh
BrowserVerifyText( uTestObject : in union, sText : in string, nOptions : in number optional, nSeverity : in number optional := SEVERITY_ERROR );
Parameter | Description |
---|---|
uTestObject | The XPath locator or the handle to the DOM element. |
sText | The caption that the element is expected to have. |
nOptions | Optional: Flagmask to configure the verification. Can be one of the following values:
|
nSeverity | Optional: Severity of the error that is raised if the verification fails. Can be one of the following values:
|
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/gwt/Showcase.html#CwBasicText"); // set the text to 'Hello World!' BrowserTypeKeys("//INPUT[@id='gwt-debug-cwBasicText-textbox']", "Hello World!"); //verify if the textfield has the expected text - case sensitive and ignoring whitespaces. //If the verification fails, an error will be raised BrowserVerifyText("//INPUT[@id='gwt-debug-cwBasicText-textbox']", "Hello World!", VERIFY_CASE_SENSITIVE | VERIFY_IGNORE_WHITESPACE, SEVERITY_ERROR); end TMain;