when(textInput.getText()).thenReturn(enteredText);
return textInput;
}
public static Select mockSelect(String selectedOptionValue) {
Select select = mock(Select.class);
WebElement selectedOption = mock(WebElement.class);
when(select.hasSelectedOption()).thenReturn(true);
when(select.getFirstSelectedOption()).thenReturn(selectedOption);
when(selectedOption.getAttribute("value")).thenReturn(selectedOptionValue);
return select;
}