# US 11,443,011 B2 · Page objects library

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,443,011 B2
- Document ID: US11443011B2
- Status: Granted
- Kind: B2
- Application number: 16/218,645
- Filed: 2018-12-13
- Published: 2020-06-18
- Granted: 2022-09-13
- Earliest claimed: 2018-12-13
- Assignees: Salesforce, Inc.
- Applicants: salesforce.com, inc.
- Inventors: Elizaveta Ivanova; Manpreet Saini; Tanay Ponkshe; Gurvinder Singh
- Web page: https://patentgrep.com/patent/US11443011B2

## CPC

- G06F 16/9574: {of access to content, e.g. by caching}
- G06F 16/986: {Document structures and storage, e.g. HTML extensions}
- G06F 11/3414: {Workload generation, e.g. scripts, playback}
- G06F 11/3684: {for test design, e.g. generating new test cases}
- G06F 16/11: File system administration, e.g. details of archiving or snapshots (error detection or correction of the data by redundancy in operations G06F11/14)
- G06F 16/972: {Access to data in other repository systems, e.g. legacy data or dynamic Web page generation}
- G06F 40/117: Tagging; Marking up (details of markup languages G06F40/143); Designating a block; Setting of attributes (style sheets, e.g. eXtensible Stylesheet Language Transformation [XSLT], G06F40/154)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system may include an application server and a user device. The application server may host an application customized for the user device. Tests may be designed to check the functionality of the application at the user device. The application and test may be designed using a page objects library which improve durability of the application and tests to changes made to the application. Thus, even if changes are made to the application, the test which check the functionality of the application may not break if the application and the tests are created based on the page objects library. The application sever may generate the page objects library and distribute the page objects library to its tenants.

## Claims

### Claim 1

A method for maintaining automated tests, comprising:
executing an automated page functionality test configured to check a functionality of an instance of a cloud-based software platform, the instance comprising at least one page of an application and one or more user interface components included in the at least one page, wherein the automated page functionality test uses a static locator to locate a component in the page, and applies one or more actions to interact with the component expecting the component to produce a first outcome, the instance being configured for a tenant of the cloud-based software platform;
identifying that a change to the static locator for the component would cause a failure of the automated page functionality test, wherein the application of the one or more actions to the component fails to result in the first outcome;
reconfiguring, based at least in part on the change to the static locator, the static locator for the component to a relative locator for the component with respect to one or more container components for the component, wherein the relative locator is configured to locate the component within the page based at least in part on starting from a root element of the page and traversing a hierarchy of components within a parent component until the relative locator locates the component in the page;
generating a library of classes for a plurality of page objects that points to relative locators, wherein the relative locator is configured with respect to a page object of the plurality of page objects; and
providing the library of classes to the tenant of the cloud-based software platform.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
identifying additional changes to the instance of the software platform that cause further failure to the automated page functionality test;
generating a revised library of classes based at least in part on the additional changes to the instance of the software platform; and
providing the revised library of classes to the tenant of the cloud-based software platform.

### Claim 3 (depends on 1)

The method of claim 1, wherein the relative locator is configured to identify the component based at least in part on the parent component and the root element of the page object.

### Claim 4 (depends on 3)

The method of claim 3, wherein the component is identified by the relative locator relative to the parent component based at least in part on the hierarchy of components for the page starting from the root of the page object.

### Claim 5 (depends on 1)

The method of claim 1, wherein the page object comprises a plurality of property files associated with the component of the page, and wherein a property file of the plurality of property files is associated with the relative locator for the component of the page based at least in part on a use context of the component within the page object for the page.

### Claim 6 (depends on 1)

The method of claim 1, wherein the component is one of a plurality of components of the page, and each component of the plurality of components of the page is configured to be located based at least in part on the relative locator and a corresponding index.

### Claim 7 (depends on 1)

The method of claim 1, wherein the library of classes comprises a class of the component, and the class of the component is supported to be used across the plurality of page objects based at least in part on the relative locator.

### Claim 8 (depends on 1)

The method of claim 1, wherein the relative locator is configured to be replaced with a direct locator to the component of the page upon execution of the automated page functionality test.

### Claim 9 (depends on 1)

The method of claim 1, wherein the library of classes is provided to the tenant of the cloud-based software platform in a java archive (JAR) file, via a shared code repository, or both.

### Claim 10 (depends on 1)

The method of claim 1, wherein the change to the static locator for the component comprises one or more of a relabeling for a text identifier of the component, an insertion or deletion of a neighboring component of the page, a modification to a class of the component, or a modification to the page object.

### Claim 11 (depends on 1)

The method of claim 1, wherein the one or more actions using the static locator for the automated page functionality test comprise clicking on the component, entering a text field into the component, or selecting a value for the component.

### Claim 12 (depends on 1)

The method of claim 1, wherein an interaction with the component is suppressed until the component can support dynamic rendering on the page.

### Claim 13 (depends on 1)

The method of claim 1, wherein the relative locator is configured to locate the component within a shadow document object model (DOM) based at least in part on a parameter of the relative locator.

### Claim 14 (depends on 1)

The method of claim 1, wherein the page object is generated based at least in part on an extensible markup language (XML) file comprising a list of fields for components, types, or indices, or any combination thereof.

### Claim 15 (depends on 1)

The method of claim 1, wherein the library of classes restricts a type of locator for the relative locator to a cascading style sheet (CSS) selector to mimic application classes and prevent duplicate locators across a plurality of pages.

### Claim 16

An apparatus for maintaining automated tests, comprising:
a processor,
memory in electronic communication with the processor; and
instructions stored in the memory and executable by the processor to cause the apparatus to:
execute an automated page functionality test configured to check a functionality of an instance of a cloud-based software platform, the instance comprising at least one page of an application and one or more user interface components included in the at least one page, wherein the automated page functionality test uses a static locator to locate a component in the page, and applies one or more actions to interact with the component expecting the component to produce a first outcome, the instance being configured for a tenant of the cloud-based software platform;
identify that a change to the static locator for the component would cause a failure of the automated page functionality test, wherein the application of the one or more actions to the component fails to result in the first outcome;
reconfigure, based at least in part on the change to the static locator, the static locator for the component to a relative locator for the component with respect to one or more container components for the component, wherein the relative locator is configured to locate the component within the page based at least in part on starting from a root element of the page and traversing a hierarchy of components within a parent component until the relative locator locates the component in the page;
generate a library of classes for a plurality of page objects that points to relative locators, wherein the relative locator is configured with respect to a page object of the plurality of page objects; and
provide the library of classes to the tenant of the cloud-based software platform.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the relative locator is configured to identify the component based at least in part on the parent component and the root element of the page object.

### Claim 18 (depends on 16)

The apparatus of claim 16, wherein the page object comprises a plurality of property files associated with the component of the page, and wherein a property file of the plurality of property files is associated with the relative locator for the component of the page based at least in part on a use context of the component within the page object for the page.

### Claim 19 (depends on 16)

The apparatus of claim 16, wherein the component is one of a plurality of components of the page, and each component of the plurality of components of the page is configured to be located based at least in part on the relative locator and a corresponding index.

### Claim 20

A non-transitory computer-readable medium storing code for maintaining automated tests, the code comprising instructions executable by a processor to:
execute an automated page functionality test configured to check a functionality of an instance of a cloud-based software platform, the instance comprising at least one page of an application and one or more user interface components included in the at least one page, wherein the automated page functionality test uses a static locator to locate a component in the page, and applies one or more actions to interact with the component expecting the component to produce a first outcome, the instance being configured for a tenant of the cloud-based software platform;
identify that a change to the static locator for the component would cause a failure of the automated page functionality test, wherein the application of the one or more actions to the component fails to result in the first outcome;
reconfigure, based at least in part on the change to the static locator, the static locator for the component to a relative locator for the component with respect to one or more container components for the component, wherein the relative locator is configured to locate the component within the page based at least in part on starting from a root element of the page and traversing a hierarchy of components within a parent component until the relative locator locates the component in the page;
generate a library of classes for a plurality of page objects that points to relative locators, wherein the relative locator is configured with respect to a page object of the plurality of page objects; and
provide the library of classes to the tenant of the cloud-based software platform.
