com.codacy.scoobydoo.web.BaseWebPage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scooby-doo-fwk Show documentation
Show all versions of scooby-doo-fwk Show documentation
Automated testing framework
package com.codacy.scoobydoo.web;
import com.codacy.scoobydoo.configuration.Configuration;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.WebDriverWait;
public abstract class BaseWebPage extends WebFragment {
// TODO: check if this is really needed.
public WebDriverWait wait;
public BaseWebPage(RemoteWebDriver driver, Configuration configuration) {
super(driver, configuration);
this.wait = new WebDriverWait(driver, config.getTimeout().PAGE_LOAD_TIMEOUT);
}
// TODO: Rename method WebUtils.refreshBrowser to refreshPage and use it instead of this. Then delete this.
@Deprecated
public void refreshPage() {
getDriver().navigate().refresh();
}
public static By byDataTestId(String locator) {
return By.cssSelector(String.format("[data-testid=\"%s\"]", locator));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy