Package ru.yandex.qatools.htmlelements.element

Examples of ru.yandex.qatools.htmlelements.element.Select


public class HasSelectedOptionTest {
    private static final String SELECTED_OPTION_VALUE = "some value";

    @Test
    public void hasSelectedOptionTest() {
        Select select = MockFactory.mockSelect(SELECTED_OPTION_VALUE);
        assertThat(select, hasSelectedOption(hasValue(SELECTED_OPTION_VALUE)));
    }
View Full Code Here


        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;
    }
View Full Code Here

TOP

Related Classes of ru.yandex.qatools.htmlelements.element.Select

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.