请问,被测网页上的这些option标签里面的属性定义了index属性吗?
用selectByIndex方法的时候最好看清楚使用说明啊:
public void selectByIndex(int index)
Select the option at the given index. This is done by examing the "index" attribute of an element, and not merely by counting.看到最后那句话了吗?它是通过标签的index属性来定位的,而不是通过自己去“数数”