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

com.epam.jdiuitests.implementation.selenium.elements.common.Text Maven / Gradle / Ivy

The newest version!
package com.epam.jdiuitests.implementation.selenium.elements.common;

import com.epam.jdiuitests.implementation.selenium.elements.base.Element;
import com.epam.jdiuitests.implementation.selenium.elements.interfaces.common.IText;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

/**
 * Created by Roman_Iovlev on 7/6/2015.
 */
public class Text extends Element implements IText {
    public Text() {
    }

    public Text(By byLocator) {
        super(byLocator);
    }

    public Text(WebElement webElement) {
        super(webElement);
    }

    protected String getTextAction() {
        return getWebElement().getText();
    }

    protected String getValueAction() {
        return getTextAction();
    }

    public final String getValue() {
        return actions.getValue(this::getValueAction);
    }

    public final String getText() {
        return actions.getText(this::getTextAction);
    }

    public final String waitText(String text) {
        return actions.waitText(text, this::getTextAction);
    }

    public final String waitMatchText(String regEx) {
        return actions.waitMatchText(regEx, this::getTextAction);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy