Sahi - Windows APIs

Windows automation is supported since Sahi Pro Desktop Add-on

Windows Actions


Sahi Action APIs work on windows since Sahi Pro Desktop Add-on. Just pass in windows accessors instead of DOM accessors

_setSelectedExcelTab

Since Sahi Pro: NA
Since Sahi OS: NA
Technologies Available: Windows

_setSelectedExcelTab($element)

Arguments
$elementstring Excel Sheet.

Returns
null

Details

Select the specified sheet in Excel
_setSelectedExcelTab(<<sheet>>);

Example:

_selectWindow("Book1 - Excel");
_setSelectedExcelTab("Sheet2");   // selects "Sheet2" tab in Book1 - Excel.

Windows Data Manipulation


_setCell

Since Sahi Pro: NA
Since Sahi OS: NA
Technologies Available: Windows

_setCell($element, $value)

Arguments
$elementWindows element cell whose value is to be set
$valuestring Value to be set

Returns
null

Details

Value entered into the specified cell of the currently selected sheet
Supports only cells within MS Excel framework
_setCell(<<cell identifier>>, <<value>>);

Example:

_setCell("A22","test");

_typeCell

Since Sahi Pro: NA
Since Sahi OS: NA
Technologies Available: Windows

_typeCell($element, $value)

Arguments
$elementWindows element cell element in which the text is to be typed
$valuestring Value to be set

Returns
null

Details

Value appended to the specific cell of the currently selected sheet
Supports only cells within MS Excel framework
_typeCell(<<cell identifier>>, <<value>>);

Example:

_typeCell("A22","test");

Windows Selection


_expand

Since Sahi Pro: NA
Since Sahi OS: NA
Technologies Available: Windows

_expand($element)

Arguments
$elementWindows element tree element to be expand.

Returns
null

Details

Expand tree element
_expand(<<element identifier>>);

Example:

_expand(_treeviewitem("First"));

_collapse

Since Sahi Pro: NA
Since Sahi OS: NA
Technologies Available: Windows

_collapse($element)

Arguments
$elementWindows element tree element to be collapsed

Returns
null

Details

Expand tree element
_collapse(<<element identifier>>);

Example:

_collapse(_treeviewitem("First"));