This function verifies that a property of a DOM element has a specified value. The logic of this function works as follows:
BrowserAPI.bdh
BrowserVerifyProperty( uTestObject : in union,
sDomPropertyName : in string,
vDomPropertyValue : in union,
nOptions : in number optional,
nSeverity : in number optional := SEVERITY_ERROR ): boolean;
| Parameter | Description |
|---|---|
| uTestObject | The XPath locator or the handle to the DOM element. |
| sDomPropertyName | The name of the property of the DOM element. |
| vDomPropertyValue | The value of the property to be verified. |
| 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:
|
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
propertyValue : boolean;
begin
BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
BrowserNavigate("http://demo.borland.com/TestSite/gwt/Showcase.html#CwCheckBox");
// check Monday
BrowserCheckBoxSelect("//SPAN[@hideFocus='0']/INPUT[@hideFocus='0']", CHECKBOX_CHECKED);
// get the value of the checked property and print it
BrowserGetProperty("//SPAN[@hideFocus='0']/INPUT[@hideFocus='0']", "checked", propertyValue);
print(string(propertyValue));
//verify that the property value is true
BrowserVerifyProperty("//SPAN[@hideFocus='0']/INPUT[@hideFocus='0']", "checked",
true, VERIFY_EQUAL | VERIFY_CASE_SENSITIVE, SEVERITY_INFORMATIONAL);
end TMain;