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

com.sdl.selenium.extjs6.notification.Notification Maven / Gradle / Ivy

Go to download

Automated Acceptance Testing. Selenium and Selenium WebDriver test framework for web applications. (optimized for dynamic html, ExtJS, Bootstrap, complex UI, simple web applications/sites)

There is a newer version: 20.08.432.0_b2d2a09
Show newest version
package com.sdl.selenium.extjs6.notification;

import com.sdl.selenium.web.SearchType;
import com.sdl.selenium.web.WebLocator;
import com.sdl.selenium.web.utils.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Notification extends WebLocator {
    private static final Logger LOGGER = LoggerFactory.getLogger(Notification.class);

    public Notification() {
        setClasses("msg", "x-border-box");
        WebLocator c = new WebLocator().setClasses("msg-container");
        setContainer(c);
    }

    public Notification(String msg) {
        this();
        getPathBuilder().defaultSearchTextType.add(SearchType.DEEP_CHILD_NODE_OR_SELF);
        setText(msg);
    }

    public Notification(String msg, SearchType... searchTypes) {
        this(msg);
        setSearchTextType(searchTypes);
    }

    public void close() {
        WebLocator close = new WebLocator(this).setClasses("x-tool-close");
        Utils.sleep(450);
        close.click();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy