com.shaft.dsl.gui.Label Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SHAFT_ENGINE Show documentation
Show all versions of SHAFT_ENGINE Show documentation
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!
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();
}
}