@Test public void shouldReturnOkIfValueWasSelectedByValue() { WebElement selectElement = mock(WebElement.class); given(webSiteConnector.getElement(node)).willReturn(selectElement); given(selectElement.getTagName()).willReturn("select"); WebElement itemElement = mock(WebElement.class); List<WebElement> itemElements = new ArrayList<>(); itemElements.add(itemElement); given(selectElement.findElements(By.xpath(". .willReturn(itemElements); s.setSelectBy(SelectAction.SelectByType.VALUE); ExecuteResult result = s.executeAction(connectors); assertTrue(result.isSuccess()); verify(itemElement).click(); }
public void setSelectBy(SelectByType selectBy) { this.selectBy = selectBy; }
SelectAction extends FillAction { public void setSelectBy(SelectByType selectBy) { this.selectBy = selectBy; } }
SelectAction extends FillAction { public void setSelectBy(SelectByType selectBy) { this.selectBy = selectBy; }  }
SelectAction extends FillAction { public void setSelectBy(SelectByType selectBy) { this.selectBy = selectBy; }  @Override ExecuteResult execute(WebSiteConnector connector); SelectByType getSelectBy(); void setSelectBy(SelectByType selectBy); }
SelectAction extends FillAction { public void setSelectBy(SelectByType selectBy) { this.selectBy = selectBy; }  @Override ExecuteResult execute(WebSiteConnector connector); SelectByType getSelectBy(); void setSelectBy(SelectByType selectBy);  }