aquality.selenium.core.configurations.LoggerConfiguration 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;
/**
* LoggerConfiguration class.
*
* @author lenovo
* @version $Id: $Id
*/
public class LoggerConfiguration implements ILoggerConfiguration {
private static final String DEFAULT_LANGUAGE = "en";
private final String language;
private final boolean doLogPageSource;
@Inject
/**
* Constructor for LoggerConfiguration.
*
* @param settingsFile a {@link aquality.selenium.core.utilities.ISettingsFile} object.
*/
public LoggerConfiguration(ISettingsFile settingsFile){
language = settingsFile.getValueOrDefault("/logger/language", DEFAULT_LANGUAGE).toString();
doLogPageSource = Boolean.parseBoolean(
settingsFile.getValueOrDefault("/logger/logPageSource", true).toString());
}
/** {@inheritDoc} */
@Override
public String getLanguage() {
return language;
}
/** {@inheritDoc} */
@Override
public boolean logPageSource() {
return doLogPageSource;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy