Package org.seleniumhq.selenium.fluent

Examples of org.seleniumhq.selenium.fluent.TestableString$ToStringValidation


    public void url_functionality() {

        wd = mock(WebDriver.class);
        fwd = new FluentWebDriver(wd);

        TestableString ts = fwd.url();

        assertThat(ts, notNullValue());
        verifyNoMoreInteractions(wd);
        // invocation of getCurrentUrl is lazy.
        when(wd.getCurrentUrl()).thenReturn("http://foo/bar");
        String actual = ts.toString();
        assertThat(actual, equalTo("http://foo/bar"));
        verify(wd).getCurrentUrl();
        verifyNoMoreInteractions(wd);
    }
View Full Code Here


    public void title_functionality() {

        wd = mock(WebDriver.class);
        fwd = new FluentWebDriver(wd);

        TestableString ts = fwd.title();

        assertThat(ts, notNullValue());
        verifyNoMoreInteractions(wd);
        // invocation of getTitle is lazy.
        when(wd.getTitle()).thenReturn("foo");
        String actual = ts.toString();
        assertThat(actual, equalTo("foo"));
        verify(wd).getTitle();
        verifyNoMoreInteractions(wd);
    }
View Full Code Here

TOP

Related Classes of org.seleniumhq.selenium.fluent.TestableString$ToStringValidation

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.