rem: Recorder.addEventHandler('select', 'change', function(event) { var tagName = event.target.tagName.toLowerCase(); if ('select' == tagName) { if (!event.target.multiple) { var label = event.target.options[event.target.selectedIndex].innerHTML; var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1"); this.log.debug('selectedIndex=' + event.target.selectedIndex); this.record("select", this.findLocator(event.target), value); } else { this.log.debug('change selection on select-multiple'); var options = event.target.options; for (var i = 0; i < options.length; i++) { this.log.debug('option=' + i + ', ' + options[i].selected); if (options[i]._wasSelected == null) { this.log.warn('_wasSelected was not recorded'); } if (options[i]._wasSelected != options[i].selected) { var label = options[i].innerHTML; var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1"); if (options[i].selected) { this.record("addSelection", this.findLocator(event.target), value); } else { this.record("removeSelection", this.findLocator(event.target), value); } options[i]._wasSelected = options[i].selected; } } } } }); 
add: return "label=regexp:" + label.replace(/\s+/g, function(str) { if (str.match(/\xA0/)) { if (str.length > 1) { return "\\s+"; } else { return "\\s"; } } else { return str; } }); 
context: Recorder.addEventHandler('select', 'change', function(event) {		var tagName = event.target.tagName.toLowerCase();		if ('select' == tagName) {			if (!event.target.multiple) {				var label = event.target.options[event.target.selectedIndex].innerHTML;				var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1");				this.log.debug('selectedIndex=' + event.target.selectedIndex);				this.record("select", this.findLocator(event.target), value);			} else {				this.log.debug('change selection on select-multiple');				var options = event.target.options;				for (var i = 0; i < options.length; i++) {					this.log.debug('option=' + i + ', ' + options[i].selected);					if (options[i]._wasSelected == null) {						this.log.warn('_wasSelected was not recorded');					}					if (options[i]._wasSelected != options[i].selected) {						var label = options[i].innerHTML;						var value = "label=" + label.replace(/^\s*(.*?)\s*$/, "$1");						if (options[i].selected) {							this.record("addSelection", this.findLocator(event.target), value);						} else {							this.record("removeSelection", this.findLocator(event.target), value);						}						options[i]._wasSelected = options[i].selected;					}				}			}		}	});
meta: 3175	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3175/7e3a98a74c13989d2bb684ddad8dfda201e7ba12/recorder-handlers.js/clean/src/content/recorder-handlers.js