Method and system for automatic test website layout
AssigneeMicro Focus LLC
InventorsEr-Xin Shang, Hua-Ming Zhai, Tezeen Yu
Life of this patent
Estimating the term…
Abstract
Method and system to automatically verify the layout of a webpage on various screen sizes. The method includes retrieving screen size data associated with the webpage. The method further includes determining anchor points for the webpage based on the retrieved screen size data. The method also includes rendering the plurality of elements of the webpage based on the retrieved screen size data and the determined anchor points and identifying a respective location of each of the plurality of elements of the webpage to verify the layout of the plurality of elements of the webpage. If an error in the layout of the webpage is detected, a visual and/or audio alert is sent.
Claims20
A system, the system comprising:
- a processor;
- and
- a memory coupled with and readable by the processor and storing therein a set of instructions which, when executed by the processor, causes the processor to verify a layout of a plurality of elements of a webpage by:
- retrieving screen size data associated with the webpage, wherein the retrieved screen size data indicates one or more supported screen sizes for the webpage;
- determining anchor points for the webpage based on the retrieved screen size data, wherein the determined anchor points specify borders of the webpage, and wherein the determined anchor points are specific to each of the one or more supported screen sizes for the webpage;
- rendering the plurality of elements of the webpage based on the retrieved screen size data and the determined anchor points;
- identifying a respective location of each of the plurality of elements of the webpage;
- verifying the layout of the plurality of elements of the webpage based on anchor points and the respective location of each of the plurality of elements of the webpage;
- and
- in response to detecting an error in the layout of the plurality of elements of the webpage resulting from a change in screen size, collapsing two or more elements into an expandable menu, wherein the error in the layout of the plurality of elements of the webpage comprises at least one of:
- at least one of the two or more elements not being within the determined anchor points, the two or more elements overlapping, and at least one of the two or more elements shifting downward in the layout of the plurality of elements.
A method to verify a layout of a plurality of elements of a webpage, the method comprising:
- retrieving screen size data associated with a webpage, wherein the retrieved screen size data indicates one or more supported screen sizes for the webpage;
- determining anchor points for the webpage based on the retrieved screen size data, wherein the determined anchor points specify borders of the webpage, and wherein the determined anchor points are specific to each of the one or more supported screen sizes for the webpage;
- rendering the plurality of elements of the webpage based on the retrieved screen size data and the determined anchor points;
- identifying a respective location of each of the plurality of elements of the webpage;
- verifying the layout of the plurality of elements of the webpage based on anchor points and the respective location of each of the plurality of elements of the webpage;
- and
- in response to detecting an error in the layout of the plurality of elements of the webpage resulting from a change in screen size, collapsing two or more elements into an expandable menu, wherein the error in the layout of the plurality of elements of the webpage comprises at least one of:
- at least one of the two or more elements not being within the determined anchor points, the two or more elements overlapping, and at least one of the two or more elements shifting downward in the layout of the plurality of elements.
A non-transitory, computer-readable medium comprising a set of instructions stored therein which, when executed by a processor, causes the processor to verify a layout a plurality of elements of a webpage by:
- retrieving screen size data associated with the webpage, wherein the retrieved screen size data indicates one or more supported screen sizes for the webpage;
- determining anchor points for the webpage based on the retrieved screen size data, wherein the determined anchor points specify borders of the webpage, and wherein the determined anchor points are specific to each of the one or more supported screen sizes for the webpage;
- rendering the plurality of elements of the webpage based on the retrieved screen size data and the determined anchor points;
- identifying a respective location of each of the plurality of elements of the webpage;
- verifying the layout of the plurality of elements of the webpage based on anchor points and the respective location of each of the plurality of elements of the webpage;
- and
- in response to detecting an error in the layout of the plurality of elements of the webpage resulting from a change in screen size, collapsing two or more elements into an expandable menu, wherein the error in the layout of the plurality of elements of the webpage comprises at least one of:
- at least one of the two or more elements not being within the determined anchor points, the two or more elements overlapping, and at least one of the two or more elements shifting downward in the layout of the plurality of elements.
Dependencies are inferred from the claim text.