Refactor activation key logging in EsetHomeSteps
Replaced string concatenation with `String#formatted` for improved readability and updated logging with `getScenario().log()` to enhance test context reporting. These changes make the output more structured and consistent.
This commit is contained in:
1 parent
ac27aa0623
commit
7f02be26cd
1 file changed
+5
-4
@@ -71,15 +71,16 @@ public class EsetHomeSteps extends Steps {
|
||||
public void esethomepageReadESETSmartSecurityActivationCode() {
|
||||
String key = $(By.xpath("//p[text()='Klucz aktywacji']/..//following-sibling::*[1]/p")).getText();
|
||||
|
||||
log.info("""
|
||||
|
||||
String keyText = """
|
||||
ESET Smart Security activation key found:
|
||||
|
||||
=---------------------------=
|
||||
{}
|
||||
%s
|
||||
=---------------------------=
|
||||
|
||||
""", ColorFormatter.GREEN.toConsole(key));
|
||||
""".formatted(ColorFormatter.GREEN.toConsole(key));
|
||||
|
||||
getContext().getScenario().log(keyText);
|
||||
}
|
||||
|
||||
public static String generatePassword(int length) {
|
||||
|
||||
Reference in new issue
Block a user