Search in sources :

Example 1 with Link

use of ru.yandex.qatools.htmlelements.element.Link in project page-factory-2 by sbtqa.

the class IndexPage method openedPage.

@ActionTitle("opened page")
public void openedPage(String page) throws ElementDescriptionException, ElementNotFoundException {
    HtmlFindUtils htmlFindUtils = Environment.getFindUtils();
    List<Link> links = htmlFindUtils.findList(null, "menu with list elements->toolbar");
    String attributeClass = ElementUtils.getElementByText(links, page).findElement(By.xpath("./..")).getAttribute("class");
    Assert.assertEquals("The path to element was compiled incorrectly.", "active", attributeClass);
}
Also used : HtmlFindUtils(ru.sbtqa.tag.pagefactory.find.HtmlFindUtils) Link(ru.yandex.qatools.htmlelements.element.Link) ActionTitle(ru.sbtqa.tag.pagefactory.annotations.ActionTitle)

Aggregations

ActionTitle (ru.sbtqa.tag.pagefactory.annotations.ActionTitle)1 HtmlFindUtils (ru.sbtqa.tag.pagefactory.find.HtmlFindUtils)1 Link (ru.yandex.qatools.htmlelements.element.Link)1