Search in sources :

Example 11 with ActionTitle

use of ru.sbtqa.tag.pagefactory.annotations.ActionTitle in project page-factory-2 by sbtqa.

the class ContactPage method findWebElement.

@ActionTitle("check find web element")
public void findWebElement() {
    HtmlFindUtils htmlFindUtils = Environment.getFindUtils();
    WebElement webElement = htmlFindUtils.find("send", WebElement.class);
    Assert.assertFalse("Incorrect type", webElement.getClass().isAssignableFrom(TypifiedElement.class));
    checkType(htmlFindUtils.find("send", Button.class), Button.class);
}
Also used : HtmlFindUtils(ru.sbtqa.tag.pagefactory.find.HtmlFindUtils) Button(ru.yandex.qatools.htmlelements.element.Button) WebElement(org.openqa.selenium.WebElement) TypifiedElement(ru.yandex.qatools.htmlelements.element.TypifiedElement) ActionTitle(ru.sbtqa.tag.pagefactory.annotations.ActionTitle)

Example 12 with ActionTitle

use of ru.sbtqa.tag.pagefactory.annotations.ActionTitle in project page-factory-2 by sbtqa.

the class ContactPage method findTypifiedElement.

@ActionTitle("check find typified element")
public void findTypifiedElement() {
    HtmlFindUtils htmlFindUtils = Environment.getFindUtils();
    checkType(htmlFindUtils.find("first name", TypifiedElement.class), TextInput.class);
    checkType(htmlFindUtils.find("first name", TextInput.class), TextInput.class);
    checkType(htmlFindUtils.find("first name", WebElement.class), TextInput.class);
}
Also used : HtmlFindUtils(ru.sbtqa.tag.pagefactory.find.HtmlFindUtils) TextInput(ru.yandex.qatools.htmlelements.element.TextInput) WebElement(org.openqa.selenium.WebElement) TypifiedElement(ru.yandex.qatools.htmlelements.element.TypifiedElement) ActionTitle(ru.sbtqa.tag.pagefactory.annotations.ActionTitle)

Example 13 with ActionTitle

use of ru.sbtqa.tag.pagefactory.annotations.ActionTitle in project page-factory-2 by sbtqa.

the class ContactPage method errContains.

@ActionTitle("check that error message contains")
public void errContains(String message) {
    WebPageChecks checks = new WebPageChecks();
    Assert.assertTrue(checks.checkEquality(errorMsg, message, MatchStrategy.CONTAINS));
}
Also used : WebPageChecks(ru.sbtqa.tag.pagefactory.web.checks.WebPageChecks) ActionTitle(ru.sbtqa.tag.pagefactory.annotations.ActionTitle)

Aggregations

ActionTitle (ru.sbtqa.tag.pagefactory.annotations.ActionTitle)13 HtmlFindUtils (ru.sbtqa.tag.pagefactory.find.HtmlFindUtils)4 WebElement (org.openqa.selenium.WebElement)3 ArrayList (java.util.ArrayList)2 ActionTitles (ru.sbtqa.tag.pagefactory.annotations.ActionTitles)2 WebPageChecks (ru.sbtqa.tag.pagefactory.web.checks.WebPageChecks)2 TypifiedElement (ru.yandex.qatools.htmlelements.element.TypifiedElement)2 Button (com.epam.jdi.uitests.web.selenium.elements.common.Button)1 Input (com.epam.jdi.uitests.web.selenium.elements.common.Input)1 Actions (org.openqa.selenium.interactions.Actions)1 ElementNotFoundException (ru.sbtqa.tag.pagefactory.exceptions.ElementNotFoundException)1 PageException (ru.sbtqa.tag.pagefactory.exceptions.PageException)1 WaitException (ru.sbtqa.tag.pagefactory.exceptions.WaitException)1 MenuBlock (ru.sbtqa.tag.pagefactory.pages.htmlelements.blocks.MenuBlock)1 I18N (ru.sbtqa.tag.qautils.i18n.I18N)1 I18NRuntimeException (ru.sbtqa.tag.qautils.i18n.I18NRuntimeException)1 Button (ru.yandex.qatools.htmlelements.element.Button)1 CheckBox (ru.yandex.qatools.htmlelements.element.CheckBox)1 HtmlElement (ru.yandex.qatools.htmlelements.element.HtmlElement)1 Link (ru.yandex.qatools.htmlelements.element.Link)1