def select_by_index(self, index):
        """Select the option at the given index. This is done by examing the "index" attribute of an
           element, and not merely by counting.

           :Args:
            - index - The option at this index will be selected

           throws NoSuchElementException If there is no option with specified index in SELECT
           """
        match = str(index)
        for opt in self.options:
            if opt.get_attribute("index") == match:
                self._setSelected(opt)
                return
        raise NoSuchElementException("Could not locate element with index %d" % index)