com.seleniumtests.reporter.logger.HyperlinkInfo Maven / Gradle / Ivy
package com.seleniumtests.reporter.logger;
import com.seleniumtests.customexception.CustomSeleniumTestsException;
import com.seleniumtests.util.StringUtility;
public class HyperlinkInfo extends StringInfo {
private String link;
public HyperlinkInfo(String info, String link) {
super(info);
this.link = link;
}
@Override
public String encode(String format) {
if ("html".equals(format)) {
return String.format("%s", link, StringUtility.encodeString(info, format));
} else {
try {
return StringUtility.encodeString(String.format("link %s;info %s", link, info), format);
} catch (CustomSeleniumTestsException e) {
return info;
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy