Search in sources :

Example 1 with FrameworkPage

use of com.epam.healenium.FrameworkPage in project healenium-example-maven by healenium.

the class SelenideContext method useSettings.

@Override
public HashMap<String, FrameworkPage> useSettings() {
    HashMap<String, FrameworkPage> selenideContext = new HashMap<>();
    selenideContext.put(String.valueOf(PagesType.TEST_ENV), new SelenideTestEnvPage());
    selenideContext.put(String.valueOf(PagesType.CALLBACK), new SelenideCallbackPage());
    selenideContext.put(String.valueOf(PagesType.MARKUP), new SelenideMarkupPage());
    selenideContext.put(String.valueOf(PagesType.MARKUP_FIND_BY), new SelenideMainPageWithFindBy());
    return selenideContext;
}
Also used : FrameworkPage(com.epam.healenium.FrameworkPage) SelenideCallbackPage(com.epam.healenium.selenide.pageobject.callback.SelenideCallbackPage) HashMap(java.util.HashMap) SelenideTestEnvPage(com.epam.healenium.selenide.pageobject.testenv.SelenideTestEnvPage) SelenideMainPageWithFindBy(com.epam.healenium.selenide.pageobject.markup.SelenideMainPageWithFindBy) SelenideMarkupPage(com.epam.healenium.selenide.pageobject.markup.SelenideMarkupPage)

Example 2 with FrameworkPage

use of com.epam.healenium.FrameworkPage in project healenium-example-maven by healenium.

the class SeleniumContext method useSettings.

@Override
public HashMap<String, FrameworkPage> useSettings() {
    HashMap<String, FrameworkPage> seleniumContext = new HashMap<>();
    seleniumContext.put(String.valueOf(PagesType.TEST_ENV), new TestEnvPage(this.driver));
    seleniumContext.put(String.valueOf(PagesType.MARKUP), new MarkupPage(this.driver));
    seleniumContext.put(String.valueOf(PagesType.MARKUP_FIND_BY), new MainPageWithFindBy(this.driver));
    seleniumContext.put(String.valueOf(PagesType.CALLBACK), new CallbackPage(this.driver));
    return seleniumContext;
}
Also used : FrameworkPage(com.epam.healenium.FrameworkPage) HashMap(java.util.HashMap) MainPageWithFindBy(com.epam.healenium.selenium.pageobject.markup.MainPageWithFindBy) TestEnvPage(com.epam.healenium.selenium.pageobject.testenv.TestEnvPage) MarkupPage(com.epam.healenium.selenium.pageobject.markup.MarkupPage) CallbackPage(com.epam.healenium.selenium.pageobject.callback.CallbackPage)

Example 3 with FrameworkPage

use of com.epam.healenium.FrameworkPage in project healenium-example-maven by healenium.

the class CssTest method testCssAttribute.

@Test
@Severity(SeverityLevel.NORMAL)
@Description("Update locator for element with css attribute")
public void testCssAttribute() {
    FrameworkPage callbackTestPage = pages.get(String.valueOf(PagesType.CALLBACK));
    boolean result = callbackTestPage.openPage().clickAddSquareButton().verifySquareElement();
    assertTrue(result, "Element with css enabled");
    for (int i = 0; i <= 2; i++) {
        result = callbackTestPage.clickUpdateSquareButton().verifySquareElement();
        assertTrue(result, "Element with css was healed");
    }
}
Also used : FrameworkPage(com.epam.healenium.FrameworkPage) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test) Severity(io.qameta.allure.Severity)

Example 4 with FrameworkPage

use of com.epam.healenium.FrameworkPage in project healenium-example-maven by healenium.

the class CssTest method testCssClassName.

@Test
@Severity(SeverityLevel.NORMAL)
@Description("Update locator for element with css ClassName")
public void testCssClassName() {
    FrameworkPage page = pages.get(String.valueOf(PagesType.TEST_ENV));
    page.openPage().findTestElement(LocatorType.CSS, ".test_class").clickSubmitButton().findTestElement(LocatorType.CSS, ".test_class");
}
Also used : FrameworkPage(com.epam.healenium.FrameworkPage) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test) Severity(io.qameta.allure.Severity)

Example 5 with FrameworkPage

use of com.epam.healenium.FrameworkPage in project healenium-example-maven by healenium.

the class CssTest method testCssId.

@Test
@Severity(SeverityLevel.NORMAL)
@Description("Update locator for element with css id")
public void testCssId() {
    FrameworkPage page = pages.get(String.valueOf(PagesType.TEST_ENV));
    page.openPage().findTestElement(LocatorType.CSS, "#change_id").clickSubmitButton().findTestElement(LocatorType.CSS, "#change_id");
}
Also used : FrameworkPage(com.epam.healenium.FrameworkPage) Description(io.qameta.allure.Description) Test(org.junit.jupiter.api.Test) Severity(io.qameta.allure.Severity)

Aggregations

FrameworkPage (com.epam.healenium.FrameworkPage)36 Description (io.qameta.allure.Description)34 Severity (io.qameta.allure.Severity)34 Test (org.junit.jupiter.api.Test)34 HashMap (java.util.HashMap)2 SelenideCallbackPage (com.epam.healenium.selenide.pageobject.callback.SelenideCallbackPage)1 SelenideMainPageWithFindBy (com.epam.healenium.selenide.pageobject.markup.SelenideMainPageWithFindBy)1 SelenideMarkupPage (com.epam.healenium.selenide.pageobject.markup.SelenideMarkupPage)1 SelenideTestEnvPage (com.epam.healenium.selenide.pageobject.testenv.SelenideTestEnvPage)1 CallbackPage (com.epam.healenium.selenium.pageobject.callback.CallbackPage)1 MainPageWithFindBy (com.epam.healenium.selenium.pageobject.markup.MainPageWithFindBy)1 MarkupPage (com.epam.healenium.selenium.pageobject.markup.MarkupPage)1 TestEnvPage (com.epam.healenium.selenium.pageobject.testenv.TestEnvPage)1