aquality.selenium.core.configurations.RetryConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aquality-selenium-core Show documentation
Show all versions of aquality-selenium-core Show documentation
Library with core functions simplifying work with Selenium-controlled applications.
package aquality.selenium.core.configurations;
import aquality.selenium.core.utilities.ISettingsFile;
import com.google.inject.Inject;
import java.time.Duration;
/**
* RetryConfiguration class.
*
* @author lenovo
* @version $Id: $Id
*/
public class RetryConfiguration implements IRetryConfiguration {
private final int number;
private final Duration pollingInterval;
@Inject
/**
* Constructor for RetryConfiguration.
*
* @param settingsFile a {@link aquality.selenium.core.utilities.ISettingsFile} object.
*/
public RetryConfiguration(ISettingsFile settingsFile) {
this.number = Integer.parseInt(settingsFile.getValue("/retry/number").toString());
this.pollingInterval = Duration.ofMillis(Long.parseLong(settingsFile.getValue("/retry/pollingInterval").toString()));
}
/** {@inheritDoc} */
@Override
public int getNumber() {
return number;
}
/** {@inheritDoc} */
@Override
public Duration getPollingInterval() {
return pollingInterval;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy