when(selectedOption.getAttribute("value")).thenReturn(selectedOptionValue);
return select;
}
public static Radio mockRadio(String selectedButtonValue) {
Radio radio = mock(Radio.class);
WebElement selectedButton = mock(WebElement.class);
when(radio.hasSelectedButton()).thenReturn(true);
when(radio.getSelectedButton()).thenReturn(selectedButton);
when(selectedButton.getAttribute("value")).thenReturn(selectedButtonValue);
return radio;
}