Patent attributes
A computer-implemented method, system and computer program product for detecting truncation and overlap defects. Location and size information for the elements of the webpage are obtained. An intersection over union (IoU) calculation is performed for two webpage elements using the obtained location and size information for at least one of these webpage elements. Furthermore, the location relationship between these two webpage elements is determined. A table, which defines truncation defect and overlap defect scenarios, is then reviewed to determine if there are any truncation or overlap defects in these two webpage elements using the IoU calculation, the location relationship and the text condition, which indicates whether text is included in one of the two webpage elements. If any truncation or overlap defects are found in the webpage, then such truncation and/or overlap defects are marked on a screen capture of the webpage.