You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!detectedLanguage.toLowerCase().equals(lang.toLowerCase())) {
69
-
System.out.println("\n!!! - Piece of text without translation: \n" + tempString + "\nExpected language is \"" + lang + "\"\n");
70
-
System.out.println("\n!!! Current URL is " + driver.getCurrentUrl() + "\n- !!!");
71
-
System.out.println(String.format("\n!!! Characters are between %s and %s from %s full amount of characters \n", i, i + textBlockLength, bodyTextLength));
72
+
LOG.info("\n!!! - Piece of text without translation: \n" + tempString + "\nExpected language is \"" + lang + "\"\n");
73
+
LOG.info("\n!!! Current URL is " + driver.getCurrentUrl() + "\n- !!!");
74
+
LOG.info(String.format("\n!!! Characters are between %s and %s from %s full amount of characters \n", i, i + textBlockLength, bodyTextLength));
72
75
isCorrectLang = false;
73
76
break;
74
77
}
75
78
} catch (Exceptione) {
76
-
System.out.println("\n!!! - Impossible to recognise the language of this piece of text: \n" + tempString + "\nExpected language is \"" + lang + "\"\n");
77
-
System.out.println("\n!!! Current URL is " + driver.getCurrentUrl() + "\n- !!!");
78
-
System.out.println(String.format("\n!!! Characters are between %s and %s from %s full amount of characters \n", i, i + textBlockLength, bodyTextLength));
79
+
LOG.info("\n!!! - Impossible to recognise the language of this piece of text: \n" + tempString + "\nExpected language is \"" + lang + "\"\n");
80
+
LOG.info("\n!!! Current URL is " + driver.getCurrentUrl() + "\n- !!!");
81
+
LOG.info(String.format("\n!!! Characters are between %s and %s from %s full amount of characters \n", i, i + textBlockLength, bodyTextLength));
for (Map.Entry<WebElement, String> entry : offsetRightElements.entrySet()) {
317
-
if (!elementsHasEqualOffset(false, entry.getKey())) {
344
+
if (!elementsHasEqualLeftRightOffset(false, entry.getKey())) {
318
345
putJsonDetailsWithElement(String.format("Element '%s' has not the same right offset as element '%s'", rootElementReadableName, entry.getValue()), entry.getKey());
for (Map.Entry<WebElement, String> entry : offsetLeftElements.entrySet()) {
326
-
if (!elementsHasEqualOffset(true, entry.getKey())) {
353
+
if (!elementsHasEqualLeftRightOffset(true, entry.getKey())) {
327
354
putJsonDetailsWithElement(String.format("Element '%s' has not the same left offset as element '%s'", rootElementReadableName, entry.getValue()), entry.getKey());
328
355
}
329
356
}
330
357
offsetLeftElements.clear();
331
358
}
332
359
360
+
privatevoidvalidateTopOffsetForElements() {
361
+
for (Map.Entry<WebElement, String> entry : offsetTopElements.entrySet()) {
362
+
if (!elementsHasEqualTopBottomOffset(true, entry.getKey())) {
363
+
putJsonDetailsWithElement(String.format("Element '%s' has not the same top offset as element '%s'", rootElementReadableName, entry.getValue()), entry.getKey());
364
+
}
365
+
}
366
+
offsetTopElements.clear();
367
+
}
368
+
369
+
privatevoidvalidateBottomOffsetForElements() {
370
+
for (Map.Entry<WebElement, String> entry : offsetBottomElements.entrySet()) {
371
+
if (!elementsHasEqualTopBottomOffset(false, entry.getKey())) {
372
+
putJsonDetailsWithElement(String.format("Element '%s' has not the same bottom offset as element '%s'", rootElementReadableName, entry.getValue()), entry.getKey());
373
+
}
374
+
}
375
+
offsetBottomElements.clear();
376
+
}
377
+
333
378
privatevoidvalidateOverlappingWithElements() {
334
379
for (Map.Entry<WebElement, String> entry : overlapElements.entrySet()) {
0 commit comments