This function can be used to highlight an object by changing its background and foreground color.
BrowserAPI.bdh
BrowserHighlight( uTestObject : in union,
sForeground : in string,
sBackground : in string ): boolean;
| Parameter | Description |
|---|---|
| uTestObject | The XPath locator or the handle to the DOM element. |
| sForeground | The foreground color that should be used to highlight the object, for example Red or #ff0000. |
| sBackground | The background color that should be used to highlight the object, for example Red or #ff0000. |
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
liHandle : number;
begin
BrowserStart(BROWSER_MODE_DEFAULT, 800, 600);
BrowserNavigate("http://demo.borland.com");
liHandle := BrowserFind(HANDLE_DESKTOP, "//LI");
// highlight the first list item with a yellow background, wait 5 seconds and then undo the highlighting
BrowserHighlight(liHandle, "black", "yellow");
Wait(5.0);
BrowserUnhighlight(liHandle);
end TMain;