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 (marginBetweenRoot < bottomMinMargin || marginBetweenRoot > bottomMaxMargin) {
538
+
putJsonDetailsWithElement(String.format("Below element aligned not properly. Expected margin should be between %spx and %spx. Actual margin is %spx", bottomMinMargin, bottomMaxMargin, marginBetweenRoot), bottomElement);
539
+
}
540
+
}
541
+
471
542
privatevoidvalidateBelowElement() {
472
543
List<WebElement> elements = newArrayList<>();
473
544
elements.add(rootElement);
474
-
elements.add(belowElement);
545
+
elements.add(bottomElement);
475
546
476
547
if (!PageValidator.elementsAreAlignedVertically(elements)) {
477
548
putJsonDetailsWithoutElement("Below element aligned not properly");
if (marginBetweenRoot < topMinMargin || marginBetweenRoot > topMaxMargin) {
557
+
putJsonDetailsWithElement(String.format("Above element aligned not properly. Expected margin should be between %spx and %spx. Actual margin is %spx", topMinMargin, topMaxMargin, marginBetweenRoot), topElement);
558
+
}
559
+
}
560
+
481
561
privatevoidvalidateAboveElement() {
482
562
List<WebElement> elements = newArrayList<>();
483
-
elements.add(aboveElement);
563
+
elements.add(topElement);
484
564
elements.add(rootElement);
485
565
486
566
if (!PageValidator.elementsAreAlignedVertically(elements)) {
487
567
putJsonDetailsWithoutElement("Above element aligned not properly");
if (marginBetweenRoot < rightMinMargin || marginBetweenRoot > rightMaxMargin) {
575
+
putJsonDetailsWithElement(String.format("Right element aligned not properly. Expected margin should be between %spx and %spx. Actual margin is %spx", rightMinMargin, rightMaxMargin, marginBetweenRoot), rightElement);
if (marginBetweenRoot < leftMinMargin || marginBetweenRoot > leftMaxMargin) {
594
+
putJsonDetailsWithElement(String.format("Left element aligned not properly. Expected margin should be between %spx and %spx. Actual margin is %spx", leftMinMargin, leftMaxMargin, marginBetweenRoot), leftElement);
{"rootElement":{"x":493,"width":934,"y":323,"height":405},"details":[{"reason":{"message":"Expected min height of element 'Fields' is: 500px. Actual height is: 405px"}},{"reason":{"message":"Element 'Fields' has not the same left offset as element 'Panels'","element":{"x":489.0,"width":942.0,"y":731.0,"height":68.0}}},{"reason":{"message":"Element 'Fields' has not the same right offset as element 'Panels'","element":{"x":489.0,"width":942.0,"y":731.0,"height":68.0}}},{"reason":{"message":"Element 'Fields' has not the same right offset as element 'Clear All'","element":{"x":1386.0,"width":38.0,"y":263.0,"height":48.0}}}],"screenshot":"screenshot6339565532283170740.png","error":true}
{"rootElement":{"x":1386,"width":38,"y":263,"height":48},"details":[{"reason":{"message":"Left element aligned not properly. Expected margin should be between 50px and 100px. Actual margin is 1503px","element":{"x":493.0,"width":610.0,"y":263.0,"height":48.0}}},{"reason":{"message":"Element 'Clear All' has not the same left offset as element 'Panels'","element":{"x":489.0,"width":942.0,"y":731.0,"height":68.0}}}],"screenshot":"screenshot6115477721966526307.png","error":true}
0 commit comments