com.onevizion.uitest.api.helper.view.ViewWait Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ui-test-api Show documentation
Show all versions of ui-test-api Show documentation
An API for easily write tests for OneVizion platform
The newest version!
package com.onevizion.uitest.api.helper.view;
import java.util.function.Supplier;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.onevizion.uitest.api.SeleniumSettings;
@Component
class ViewWait {
@Autowired
private View view;
@Autowired
private SeleniumSettings seleniumSettings;
void waitCurrentViewName(Long gridIdx, String viewName) {
Supplier actualValueSupplier = ()-> view.getCurrentViewName(gridIdx);
Supplier messageSupplier = ()-> "Waiting for Current View Name gridIdx=[" + gridIdx + "] expectedVal=[" + viewName + "] actualVal=[" + actualValueSupplier.get() + "] is failed";
new WebDriverWait(seleniumSettings.getWebDriver(), seleniumSettings.getDefaultTimeout())
.withMessage(messageSupplier)
.until(webdriver -> viewName.equals(actualValueSupplier.get()));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy