AddSelectionRange - web automation method

Add a range of options to the current selection in HTML multiple selection list-box web controls.

Applies to:
Element
  elementObj.AddSelectionRange(start_range, end_range);
Arguments:
Remarks:
The options between start_range and end_range are added to selection.
Each of the two input parameters can be:
If the speciffied range is empty (no option matches the input parameters), then a script exception is thrown and the lastError property is set to NOT_FOUND_ERROR
If the method is applied to an Element that is not a HTML multiple selection list-box web control, then a script exception is thrown and the lastError property is set to INVALID_OPERATION_ERROR.

The time allocated for automating the options selection is specified by the searchTimeout property. If loadTimeout is not zero, then the method waits the browser objects to be completely loaded in the amount of time specified by the property. If the timeout has expired the lastError property is set to LOAD_TIMEOUT_ERROR. In this case, if loadTimeoutIsError property is true, then a script exception is thrown.
Example:
// Assume nativeList is a <select multiple> HTML element.
// Select the first three items in the multiple selection list-box control.
var coreObj = new ActiveXObject("OpenTwebst.Core");
var list    = coreObj.AttachToNativeElement(nativeList);
list.Select(0);
list.AddSelectionRange(1, 2);
		
See also:
AddSelectionRange | ClearSelection | Element | GetAllSelectedOptions | Select | selectedOption | SelectRange

© 2017 CodeCentrix Software. All rights reserved.