Package ru.yandex.qatools.htmlelements.matchers.testpages

Examples of ru.yandex.qatools.htmlelements.matchers.testpages.PageWithCustomBlock


    private WebDriver driver = MockFactory.mockDriver();

    @Test
    public void doesElementExist() {
        WebElement element = MockFactory.mockLocatableElement(By.className(CustomBlock.CLASS_NAME), driver);
        PageWithCustomBlock page = new PageWithCustomBlock(driver);

        assertThat(element, exists());
        assertThat(page.getBlock(), exists());
    }
View Full Code Here



    @Test
    public void doesElementNotExist() {
        WebElement element = MockFactory.mockNotLocatableElement(driver);
        PageWithCustomBlock page = new PageWithCustomBlock(driver);

        assertThat(element, not(exists()));
        assertThat(page.getBlock(), not(exists()));
    }
View Full Code Here

    private WebDriver driver = MockFactory.mockDriver();

    @Test
    public void isElementEnabled() {
        WebElement element = MockFactory.mockEnabledElement(By.className(CustomBlock.CLASS_NAME), driver);
        PageWithCustomBlock page = new PageWithCustomBlock(driver);

        assertThat(element, isEnabled());
        assertThat(page.getBlock(), isEnabled());
    }
View Full Code Here

    }

    @Test
    public void isElementNotEnabled() {
        WebElement element = MockFactory.mockNotEnabledElement(By.className(CustomBlock.CLASS_NAME), driver);
        PageWithCustomBlock page = new PageWithCustomBlock(driver);

        assertThat(element, not(isEnabled()));
        assertThat(page.getBlock(), not(isEnabled()));
    }
View Full Code Here

    private WebDriver driver = MockFactory.mockDriver();

    @Test
    public void isElementDisplayed() {
        WebElement element = MockFactory.mockDisplayedElement(By.className(CustomBlock.CLASS_NAME), driver);
        PageWithCustomBlock page = new PageWithCustomBlock(driver);

        assertThat(element, isDisplayed());
        assertThat(page.getBlock(), isDisplayed());
    }
View Full Code Here

    }

    @Test
    public void isElementNotDisplayed() {
        WebElement element = MockFactory.mockNotDisplayedElement(By.className(CustomBlock.CLASS_NAME), driver);
        PageWithCustomBlock page = new PageWithCustomBlock(driver);

        assertThat(element, not(isDisplayed()));
        assertThat(page.getBlock(), not(isDisplayed()));
    }
View Full Code Here

    }

    @Test
    public void notExistingElementShouldBeNotDisplayed() {
        WebElement element = MockFactory.mockNotLocatableElement(driver);
        PageWithCustomBlock page = new PageWithCustomBlock(driver);

        assertThat(element, not(isDisplayed()));
        assertThat(page.getBlock(), not(isDisplayed()));
    }
View Full Code Here

TOP

Related Classes of ru.yandex.qatools.htmlelements.matchers.testpages.PageWithCustomBlock

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.