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

com.shaft.dsl.gui.Label Maven / Gradle / Ivy

Go to download

SHAFT is a unified test automation engine. Powered by best-in-class frameworks, SHAFT provides a wizard-like syntax to drive your automation efficiently, maximize your ROI, and minimize your learning curve. Stop reinventing the wheel. Upgrade now!

There is a newer version: 8.2.20240402
Show newest version
package com.shaft.dsl.gui;

import com.shaft.validation.Validations;
import org.openqa.selenium.By;


@SuppressWarnings("unused")
public class Label extends Element {

    public Label(By locator) {
        super(locator);
    }

    public String getText() {
        return elementActions.getText(locator);
    }

    public void waitForTextToChange(String initialValve) {
        elementActions.waitForTextToChange(locator, initialValve);
    }

    public void shouldHaveText(String expectedValue) {
        Validations.assertThat().object(getText()).isEqualTo(expectedValue).perform();
    }

    public void shouldHaveText(String expectedValue, String reportMsg) {
        Validations.assertThat().object(getText()).isEqualTo(expectedValue).withCustomReportMessage(reportMsg).perform();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy