IP Library › Granted Patent US 12,332,770
Granted Patent B2
US 12,332,770 · App. 17/360,390 · Granted Jun 17, 2025

Automated locating of GUI elements during testing using multidimensional indices

Inventors: Jin Shi (Ningbo, CN); Lu Chen (Ningbo, CN); Tang Xue Bo (Ningbo, CN); Ping Yang (Ningbo, CN); Meng Qi Chen (Ningbo, CN); Rui Na Liu (Ningbo, CN)
Assignee: International Business Machines Corporation
G06F11/3688G06F3/0485G06F11/3698G06N20/00G06T7/70G06T2207/20081
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,332,770
App. No.
17/360,390
Granted
Jun 17, 2025
Kind
B2
Abstract

Disclosed are techniques for automated locating of user interface elements during graphical user interface testing. When a graphical user interface (GUI) is received for testing, images of the GUI are inputted to a machine learning algorithm, where image processing techniques are applied to identify groups of user interface elements and their constituent elements. Multi-dimensional index values are assigned to groups and elements corresponding to their positions within the GUI. Automated testing of the user interface elements of the GUI is performed by locating the user interface elements by their index values. If an element is not found, a scrolling technique is applied to generate an expanded virtual GUI of one or more groups of user interface elements, and the machine learning algorithm refreshes the index values using the expanded virtual GUI.

Claims (50)

1. A computer-implemented method (CIM) comprising:

receiving a first graphical user interface, including a first plurality of graphical user interface elements;

receiving a machine learning model trained to determine positions of groups of user interface elements and their corresponding constituent user interface elements in an image of a graphical user interface, wherein a serial number assigned to each of the corresponding constituent user interface elements are highlighted on the fly;

indexing, into a first position mapping table, each graphical user interface element of the first plurality of graphical user interface elements with a multidimensional index value corresponding to at least three dimensions based, at least in part, on the machine learning model, where at least one dimension of the at least three dimensions corresponds to grouping status within a hierarchical group of elements, and wherein the multidimensional index value comprises: (i) a first dimension indicative of horizontal position on the first graphical user interface, (ii) a second dimension comprising vertical position on the first graphical user interface, and (iii) a third dimension corresponding to relative placement within the hierarchical group of elements;

testing the first graphical user interface with a first automated graphical user interface test, where the first automated graphical user interface test locates graphical user interface elements for testing based, at least in part, on the serial number as a locator to locate the corresponding constituent user interface elements on the first position mapping table; and

applying a scrolling technique to generate an expanded virtual graphical user interface of one or more groups of user interface elements, wherein the machine learning model refreshes the multidimensional index values using the expanded virtual graphical user interface to reveal other graphical user interface elements not previously visible by: analyzing the expanded virtual graphical user interface (GUI) to identify newly revealed GUI elements; determining positions and hierarchical relationships of the newly revealed GUI elements; and updating the first position mapping table with new multidimensional index values for the newly revealed GUI elements, wherein the new multidimensional index values maintain consistency with an indexing scheme of previously indexed elements while incorporating the newly revealed elements into a hierarchical structure.

2. The CIM of claim 1 , wherein the multidimensional index value further includes a fourth dimension corresponding to a version of the first graphical user interface, where different versions of the first graphical user interface correspond to changes to the first graphical user interface.

3. The CIM of claim 1 , wherein the first automated graphical user interface test further comprises:

executing a first user interface test simulating user interaction between at least some of the first plurality of graphical user interface elements by simulating user input with the first graphical user interface, where the first plurality of graphical user interface elements are located by their respectively assigned multidimensional index value in the first position mapping table.

4. The CIM of claim 1 , further comprising:

receiving a second graphical user interface, based, at least in part, on the first graphical user interface, including a second plurality of graphical user interface elements, where at least some of the second plurality of graphical user interface elements correspond to each of the graphical user interface elements of the first plurality of graphical user interface elements;

indexing, into a second position mapping table, each graphical user interface element of the second plurality of graphical user interface elements with a multidimensional index value corresponding to at least three dimensions based, at least in part, on the machine learning model, where at least one dimension of the at least three dimensions corresponds to grouping status within a hierarchical group of elements; and

testing the second graphical user interface with the first automated graphical user interface test, where the first automated graphical user interface test locates graphical user interface elements based, at least in part, on the second position mapping table.

5. The CIM of claim 4 , further comprising:

while testing the second graphical user interface with the first automated graphical user interface test, responsive to the first graphical user interface test requesting an index absent from the second position mapping table, generating a virtual map of the second graphical user interface by scrolling at least some portions of the second graphical user interface in one or more directions, where the virtual map includes at least some graphical user interface elements of the second plurality of graphical user interface elements which were not visible on the second graphical user interface when previously indexed.

6. A computer program product (CPP) comprising:

a machine readable storage device; and

computer code stored on the machine readable storage device, with the computer code including instructions for causing a processor set to perform operations including the following:

receiving a first graphical user interface, including a first plurality of graphical user interface elements,

receiving a machine learning model trained to determine positions of groups of user interface elements and their corresponding constituent user interface elements in an image of a graphical user interface, wherein a serial number assigned to each of the corresponding constituent user interface elements are highlighted on the fly;

indexing, into a first position mapping table, each graphical user interface element of the first plurality of graphical user interface elements with a multidimensional index value corresponding to at least three dimensions based, at least in part, on the machine learning model, where at least one dimension of the at least three dimensions corresponds to grouping status within a hierarchical group of elements, and wherein the multidimensional index value comprises: (i) a first dimension indicative of horizontal position on the first graphical user interface, (ii) a second dimension comprising vertical position on the first graphical user interface, and (iii) a third dimension corresponding to relative placement within the hierarchical group of elements;

testing the first graphical user interface with a first automated graphical user interface test, where the first automated graphical user interface test locates graphical user interface elements for testing based, at least in part, on the serial number as a locator to locate the corresponding constituent user interface elements on the first position mapping table; and

applying a scrolling technique to generate an expanded virtual graphical user interface of one or more groups of user interface elements, wherein the machine learning model refreshes the multidimensional index values using the expanded virtual graphical user interface to reveal other graphical user interface elements not previously visible by: analyzing the expanded virtual graphical user interface (GUI) to identify newly revealed GUI elements; determining positions and hierarchical relationships of the newly revealed GUI elements; and updating the first position mapping table with new multidimensional index values for the newly revealed GUI elements, wherein the new multidimensional index values maintain consistency with an indexing scheme of previously indexed elements while incorporating the newly revealed elements into a hierarchical structure.

7. The CPP of claim 6 , wherein the multidimensional index value further includes a fourth dimension corresponding to a version of the first graphical user interface, where different versions of the first graphical user interface correspond to changes to the first graphical user interface.

8. The CPP of claim 6 , wherein the first automated graphical user interface test further comprises:

executing a first user interface test simulating user interaction between at least some of the first plurality of graphical user interface elements by simulating user input with the first graphical user interface, where the first plurality of graphical user interface elements are located by their respectively assigned multidimensional index value in the first position mapping table.

9. The CPP of claim 6 , wherein the computer code further includes instructions for causing the processor set to perform the following operations:

receiving a second graphical user interface, based, at least in part, on the first graphical user interface, including a second plurality of graphical user interface elements, where at least some of the second plurality of graphical user interface elements correspond to each of the graphical user interface elements of the first plurality of graphical user interface elements;

indexing, into a second position mapping table, each graphical user interface element of the second plurality of graphical user interface elements with a multidimensional index value corresponding to at least three dimensions based, at least in part, on the machine learning model, where at least one dimension of the at least three dimensions corresponds to grouping status within a hierarchical group of elements; and

testing the second graphical user interface with the first automated graphical user interface test, where the first automated graphical user interface test locates graphical user interface elements based, at least in part, on the second position mapping table.

10. The CPP of claim 9 , wherein the computer code further includes instructions for causing the processor set to perform the following operations:

while testing the second graphical user interface with the first automated graphical user interface test, responsive to the first graphical user interface test requesting an index absent from the second position mapping table, generating a virtual map of the second graphical user interface by scrolling at least some portions of the second graphical user interface in one or more directions, where the virtual map includes at least some graphical user interface elements of the second plurality of graphical user interface elements which were not visible on the second graphical user interface when previously indexed.

11. A computer system (CS) comprising:

a processor set;

a machine readable storage device; and

computer code stored on the machine readable storage device, with the computer code including instructions for causing the processor set to perform operations including the following:

receiving a first graphical user interface, including a first plurality of graphical user interface elements,

receiving a machine learning model trained to determine positions of groups of user interface elements and their corresponding constituent user interface elements in an image of a graphical user interface, wherein a serial number assigned to each of the corresponding constituent user interface elements are highlighted on the fly;

indexing, into a first position mapping table, each graphical user interface element of the first plurality of graphical user interface elements with a multidimensional index value corresponding to at least three dimensions based, at least in part, on the machine learning model, where at least one dimension of the at least three dimensions corresponds to grouping status within a hierarchical group of elements, and wherein the multidimensional index value comprises: (i) a first dimension indicative of horizontal position on the first graphical user interface, (ii) a second dimension comprising vertical position on the first graphical user interface, and (iii) a third dimension corresponding to relative placement within the hierarchical group of elements;

testing the first graphical user interface with a first automated graphical user interface test, where the first automated graphical user interface test locates graphical user interface elements for testing based, at least in part, on the serial number as a locator to locate the corresponding constituent user interface elements on the first position mapping table; and

applying a scrolling technique to generate an expanded virtual graphical user interface of one or more groups of user interface elements, wherein the machine learning model refreshes the multidimensional index values using the expanded virtual graphical user interface to reveal other graphical user interface elements not previously visible by: analyzing the expanded virtual graphical user interface (GUI) to identify newly revealed GUI elements; determining positions and hierarchical relationships of the newly revealed GUI elements; and updating the first position mapping table with new multidimensional index values for the newly revealed GUI elements, wherein the new multidimensional index values maintain consistency with an indexing scheme of previously indexed elements while incorporating the newly revealed elements into a hierarchical structure.

12. The CS of claim 11 , wherein the multidimensional index value further includes a fourth dimension corresponding to a version of the first graphical user interface, where different versions of the first graphical user interface correspond to changes to the first graphical user interface.

13. The CS of claim 11 , wherein the first automated graphical user interface test further comprises:

executing a first user interface test simulating user interaction between at least some of the first plurality of graphical user interface elements by simulating user input with the first graphical user interface, where the first plurality of graphical user interface elements are located by their respectively assigned multidimensional index value in the first position mapping table.

14. The CS of claim 11 , wherein the computer code further includes instructions for causing the processor set to perform the following operations:

receiving a second graphical user interface, based, at least in part, on the first graphical user interface, including a second plurality of graphical user interface elements, where at least some of the second plurality of graphical user interface elements correspond to each of the graphical user interface elements of the first plurality of graphical user interface elements;

indexing, into a second position mapping table, each graphical user interface element of the second plurality of graphical user interface elements with a multidimensional index value corresponding to at least three dimensions based, at least in part, on the machine learning model, where at least one dimension of the at least three dimensions corresponds to grouping status within a hierarchical group of elements; and

testing the second graphical user interface with the first automated graphical user interface test, where the first automated graphical user interface test locates graphical user interface elements based, at least in part, on the second position mapping table.

15. The CS of claim 14 , wherein the computer code further includes instructions for causing the processor set to perform the following operations:

while testing the second graphical user interface with the first automated graphical user interface test, responsive to the first graphical user interface test requesting an index absent from the second position mapping table, generating a virtual map of the second graphical user interface by scrolling at least some portions of the second graphical user interface in one or more directions, where the virtual map includes at least some graphical user interface elements of the second plurality of graphical user interface elements which were not visible on the second graphical user interface when previously indexed.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 28, 2021
From: SHI, JIN; CHEN, LU; BO, TANG XUE; YANG, PING; CHEN, MENG QI; LIU, RUI NA
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 056689/0358 →
Continuity (1)
Related Publication 20220413997A1 · Dec 29, 2022
References Cited (22)
US 9424167B2 · Lee · 2016 [cited by applicant]
US 9846634B2 · Ji · 2017 [cited by applicant]
US 11150861B1 · Thomas · 2021 [cited by examiner]
US 20060085764A1 · Klementiev · 2006 [cited by examiner]
US 20090210749A1 · Hayutin · 2009 [cited by examiner]
US 20140253559A1 · Li · 2014 [cited by applicant]
US 20140366005A1 · Kozhuharov · 2014 [cited by applicant]
US 20150339213A1 · Lee · 2015 [cited by examiner]
US 20170177587A1 · Cai · 2017 [cited by examiner]
US 20180210824A1 · Kochura · 2018 [cited by examiner]
US 20200117577A1 · Saxena · 2020 [cited by examiner]
US 20200159647A1 · Puszkiewicz · 2020 [cited by examiner]
US 20210081309A1 · Golubev · 2021 [cited by examiner]
US 20220114044A1 · Singh · 2022 [cited by examiner]
IN 202021029207A · 2020 [cited by applicant]
Hu, Gang, Linjie Zhu, and Junfeng Yang. “AppFlow: using machine learning to synthesize robust, reusable UI tests.” Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium… [cited by examiner]
Reiss, Steven P. “Seeking the user interface.” Proceedings of the 29th ACM/IEEE international conference on Automated software engineering. 2014. (Year: 2014). [cited by examiner]
White, Thomas D., Gordon Fraser, and Guy J. Brown. “Improving random GUI testing with image-based widget detection.” Proceedings of the 28th ACM SIGSOFT international symposium on software testing and analysis. 2019. (Y… [cited by examiner]
Authors, et al., “A Relationship Based Automation Test Method”, IP.com Prior Art Database Technical Disclosure, IP.com No. IPCOM000177239D, Dec. 7, 2008, 8 pgs., <https://ip.com/IPCOM/000177239>. [cited by applicant]
Authors, et al., “Method for Reusing English GUI Automation Scripts in Multilingual Environment”, IP.com Prior Art Database Technical Disclosure, IP.com No. IPCOM000152916D, May 18, 2007, 9 pgs., <https://ip.com/IPCOM/0… [cited by applicant]
Hassan, et al., “Extraction and Classification of User Interface Components from an Image”, International Journal of Pure and Applied Mathematics, 2018, vol. 118, No. 24, 16 pgs., <https://acadpubl.eu/hub/2018-118-24/4/… [cited by applicant]
Sun, et al., “UI Components Recognition System Based On Image Understanding”, 2020 IEEE 20th International Conference on Software Quality, Reliability and Security Companion (QRS-C), DOI 10.1109/QRS-C51114.2020.00022, ©… [cited by applicant]