All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.epam.jdi.uitests.web.settings.JDITestNGSettings Maven / Gradle / Ivy

There is a newer version: 2.0.27
Show newest version
package com.epam.jdi.uitests.web.settings;

/**
 * Created by Roman Iovlev on 14.02.2018
 * Email: [email protected]; Skype: roman.iovlev
 */

import com.epam.jdi.uitests.web.selenium.driver.ScreenshotMaker;
import com.epam.jdi.uitests.web.selenium.settings.WebSettings;
import com.epam.jdi.uitests.web.testng.testRunner.TestNGCheck;
import com.epam.jdi.uitests.web.testng.testRunner.TestNGLogger;
import com.epam.web.matcher.base.BaseMatcher;
import org.testng.annotations.Test;

import static com.epam.jdi.tools.PropertyReader.fillAction;
import static com.epam.web.matcher.base.BaseMatcher.screenshotAction;
import static com.epam.web.matcher.testng.Assert.setMatcher;

public class JDITestNGSettings extends WebSettings {
    public static synchronized void init() {
        logger = TestNGLogger.instance("JDI");
        asserter = new TestNGCheck().setUpLogger(logger);
        setMatcher((BaseMatcher) asserter);
        asserter.doScreenshot("no_screen");
        screenshotAction = ScreenshotMaker::doScreenshotGetMessage;
        timeouts = new WebTimeoutSettings();
    }
    public static boolean initialized = false;

    public static synchronized void initFromProperties() {
        WebSettings.initFromProperties();
        init();
        fillAction(p -> asserter.doScreenshot(p), "screenshot.strategy");
        initialized = true;
    }
    @Test
    public void testMethod() {}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy