Double clicks a DOM element with a specified position and mouse button.
The BrowserNativeDoubleClick function uses Windows API level events to simulate the mouse events. Another difference to the BrowserDoubleClick function is that you can specify a mouse position relative to the top left corner of the DOM element which is specified by the uTestObject parameter.
BrowserAPI.bdh
BrowserNativeDoubleClick( uTestObject : in union,
nX : in number optional,
nY : in number optional,
nButton : in number optional,
sTimer : in string optional ): boolean;
| Parameter | Description |
|---|---|
| uTestObject | Either a locator that identifies the DOM element or a handle to a previously found DOM element. Throws an error if an invalid handle is used or if the locator cannot be resolved. |
| nX | Optional: X position relative to the top left corner of the DOM element. Defaults to the middle of the DOM element. If the middle of the DOM element cannot be clicked, which can be the case when another element is placed in front of it, a different position will be used. If no such position can be found, a legacy click function will be used instead. |
| nY | Optional: Y position relative to the top left corner of the DOM element. Defaults to the middle of the DOM element. If the middle of the DOM element cannot be clicked, which can be the case when another element is placed in front of it, a different position will be used. If no such position can be found, a legacy click function will be used instead. |
| nButton | Optional: BUTTON_LEFT to use the left mouse button (default), BUTTON_RIGHT to use the right mouse button. You can combine mouse buttons with modifier keys using an OR operator. Specify MODIFIER_SHIFT, MODIFIER_ALT, or MODIFIER_CTRL for the respective modifier key. For example: BUTTON LEFT | MODIFIER_CTRL |
| sTimer | Optional: Name of the timer used for page measurements. If this parameter is omitted, no measurements are performed. |
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
wnd1 : number;
begin
BrowserStart(BROWSER_MODE_DEFAULT, 1230, 564);
BrowserNavigate("http://demo.borland.com/InsuranceWebExtJS/", "Navigate to demo site (#1)");
wnd1 := BrowserGetActiveWindow("wnd1");
BrowserListBoxSelect("//SELECT[@id='quick-link:jump-menu']", "Agent Lookup",
"ListBoxSelect, SELECT, name=quick-link:jump-menu (#1)");
BrowserClick("//INPUT[@id='show-all:search-all']", BUTTON_Left, "Click, INPUT, name=show-all:search-all (#1)");
BrowserNativeDoubleClick("//DIV[@textContents='Walker']", 10, 20, BUTTON_Left, "DoubleClick, DIV, textContents=Walker (#1)");
BrowserClick("//DIV[@unselectable='on'][30]/DIV[@hideFocus='0']", BUTTON_Left);
BrowserClick("//A[@textContents='Home'][2]", BUTTON_Left, "Click, A, textContents=Home (#1)");
end TMain;