@@ -35,22 +35,22 @@ public class ResponsiveUIValidator {
3535 protected static WebDriver driver ;
3636 static WebElement rootElement ;
3737 static long startTime ;
38- static boolean drawLeftOffsetLine = false ;
39- static boolean drawRightOffsetLine = false ;
40- static boolean drawTopOffsetLine = false ;
41- static boolean drawBottomOffsetLine = false ;
4238 private static boolean isMobileTopBar = false ;
4339 private static boolean withReport = false ;
4440 private static String scenarioName = "Default" ;
4541 private static Color rootColor = new Color (255 , 0 , 0 , 255 );
4642 private static Color highlightedElementsColor = new Color (255 , 0 , 255 , 255 );
4743 private static Color linesColor = Color .ORANGE ;
4844 private static String currentZoom = "100%" ;
45+ private static List <String > jsonFiles = new ArrayList <>();
4946 private static File screenshot ;
5047 private static BufferedImage img ;
5148 private static Graphics2D g ;
5249 private static JSONArray errorMessage ;
53- private static List <String > jsonFiles = new ArrayList <>();
50+ boolean drawLeftOffsetLine = false ;
51+ boolean drawRightOffsetLine = false ;
52+ boolean drawTopOffsetLine = false ;
53+ boolean drawBottomOffsetLine = false ;
5454 String rootElementReadableName = "Root Element" ;
5555 List <WebElement > rootElements ;
5656 ResponsiveUIValidator .Units units = PX ;
@@ -861,7 +861,7 @@ private boolean elementsAreOverlapped(WebElement elementOverlapWith) {
861861 return ((xRoot >= elLoc .x && yRoot > elLoc .y && xRoot < elLoc .x + elSize .width && yRoot < elLoc .y + elSize .height )
862862 || (xRoot + widthRoot > elLoc .x && yRoot > elLoc .y && xRoot + widthRoot < elLoc .x + elSize .width && yRoot < elLoc .y + elSize .height )
863863 || (xRoot > elLoc .x && yRoot + heightRoot > elLoc .y && xRoot < elLoc .x + elSize .width && yRoot + heightRoot < elLoc .y + elSize .height )
864- || (xRoot + widthRoot > elLoc .x && yRoot + heightRoot > elLoc .y && xRoot + widthRoot < elLoc .x + elSize .width && yRoot + widthRoot < elLoc .y + elSize .height ))
864+ || (xRoot + widthRoot > elLoc .x && yRoot + heightRoot > elLoc .y && xRoot + widthRoot < elLoc .x + elSize .width && yRoot + heightRoot < elLoc .y + elSize .height ))
865865
866866 || ((elLoc .x > xRoot && elLoc .y > yRoot && elLoc .x + elSize .width < xRoot && elLoc .y + elSize .height < yRoot )
867867 || (elLoc .x > xRoot + widthRoot && elLoc .y > yRoot && elLoc .x + elSize .width < xRoot + widthRoot && elLoc .y + elSize .height < yRoot )
@@ -882,7 +882,7 @@ private boolean elementsAreOverlapped(WebElement rootElement, WebElement element
882882 return ((xRoot > elLoc .x && yRoot > elLoc .y && xRoot < elLoc .x + elSize .width && yRoot < elLoc .y + elSize .height )
883883 || (xRoot + widthRoot > elLoc .x && yRoot > elLoc .y && xRoot + widthRoot < elLoc .x + elSize .width && yRoot < elLoc .y + elSize .height )
884884 || (xRoot > elLoc .x && yRoot + heightRoot > elLoc .y && xRoot < elLoc .x + elSize .width && yRoot + heightRoot < elLoc .y + elSize .height )
885- || (xRoot + widthRoot > elLoc .x && yRoot + heightRoot > elLoc .y && xRoot + widthRoot < elLoc .x + elSize .width && yRoot + widthRoot < elLoc .y + elSize .height ))
885+ || (xRoot + widthRoot > elLoc .x && yRoot + heightRoot > elLoc .y && xRoot + widthRoot < elLoc .x + elSize .width && yRoot + heightRoot < elLoc .y + elSize .height ))
886886
887887 || ((elLoc .x > xRoot && elLoc .y > yRoot && elLoc .x + elSize .width < xRoot && elLoc .y + elSize .height < yRoot )
888888 || (elLoc .x > xRoot + widthRoot && elLoc .y > yRoot && elLoc .x + elSize .width < xRoot + widthRoot && elLoc .y + elSize .height < yRoot )
0 commit comments