BrowserUnhighlight Function

Action

This function is the counterpart to the BrowserHighlight function. When a DOM element has been highlighted by calling the BrowserHighlight function it can be unhighlighted by calling the BrowserUnhighlight function.

Include file

BrowserAPI.bdh

Syntax

BrowserUnhighlight( uTestObject : in union ): boolean;
Parameter Description
uTestObject The XPath locator or the handle to the DOM element.

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
  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;