Dynamic Web Element Locator Correction for Automation Testing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current automation testing solutions face challenges in reliably identifying web elements due to their dynamic nature, requiring frequent updates and relying heavily on skill-dependent string-based locators like XPath and CSS Selectors, which hampers consistency and efficiency in test case execution.

Innovation Solution

A system comprising an object identifier module with a locator generator, object structure generator, object spy, and data serializer, along with an automation engine and object repository, that generates hierarchical representations and corrects object locators on the fly during test execution, using XML Path Language (XPath) or Cascaded Style Sheet (CSS) Selectors to ensure accurate identification of web elements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If string-based locators (XPath, CSS Selector) are used to identify web elements, then the automation testing can be implemented, but the identification reliability deteriorates due to dynamic nature of web elements

Engineering Contradiction:
Improveautomation testing capabilityVSAvoidelement identification reliability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The system dynamically adapts locators during test execution by detecting changes in web element attributes. The correction module continuously monitors and updates locator strategies based on current page state, transforming static locator definitions into dynamic identification mechanisms that respond to runtime changes.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system implements feedback loops where test execution results are analyzed to detect locator failures. When elements are not found or attributes change, the system feeds this information back to automatically correct and update the locator definitions, creating a self-improving testing system.

Inventive Principle:
Principle #23Feedback

2Ease of manufacture

If fixed locators are defined once and used multiple times, then the test case development is simplified, but the maintenance burden increases when page changes occur

Engineering Contradiction:
Improvetest case development easeVSAvoidtest case maintenance time
Core Design Contradiction:
Ease of manufactureVSLoss of time

Solution Approach 1:

The correction module enables self-service by automatically detecting and correcting broken locators without human intervention. When a locator fails during execution, the system autonomously analyzes the failure, identifies the correct element, and updates the locator definition, eliminating manual maintenance efforts.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system performs preliminary actions by pre-defining multiple locator strategies for each element. When the primary locator fails, the system has already prepared alternative locators that can be immediately applied, preventing test execution interruptions and reducing maintenance overhead.

Inventive Principle:
Principle #10Preliminary action

3Extent of automation

If skill-dependent locator identification is used, then the automation testing can be implemented, but the consistency deteriorates due to varying skill levels

Engineering Contradiction:
Improveautomation testing implementationVSAvoidlocator identification consistency
Core Design Contradiction:
Extent of automationVSReliability

Solution Approach 1:

The system introduces an intermediary correction module that sits between the test execution and the locator identification process. This intermediary automatically resolves inconsistencies by applying standardized correction algorithms, eliminating the impact of varying human skill levels on locator quality.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system replaces the mechanical process of manual locator identification with automated algorithms. Instead of relying on human expertise to craft locators, the system uses programmatic approaches to generate and correct locators, ensuring consistent results regardless of operator skill level.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11977477B2System and method for identification of web elements used in automation test case
Publication Date: 2024.05.07 QUALITIA SOFTWARE PVT LTD
  • US11977477B2 patent drawing
  • US11977477B2 patent drawing
  • US11977477B2 patent drawing

AI summary

Disclosed are a system (100) and a method for an identification of web elements used in an automation test case. The system (100) and the method ensure reliable identification of an object despite dynamism. The system (100) and the method allow a tester to focus on the test case development of test cases rather than object management that in turn increases the success rate and efficiency of the automatic testing. The system (100) and the method track changes in object attributes, structure and behaviour thereby facilitating identification of dynamic objects automatically and correction of the object locator on the fly during test execution.