/src/main/java/org/htmlunit/html/HtmlSelect.java
appendChild( newOption) ;element.replace( newOption) ;
element.replace ( newOption ) ;
public void replaceOption(final int index, final HtmlOption newOption) { final ChildElementsIterator iterator = new ChildElementsIterator(this); for (int i = 0; iterator.hasNext();) { final DomElement element = iterator.next(); if (element instanceof HtmlOption) { if (i == index) { <extra_id_0> ensureSelectedIndex(); return; } i++; } }