# Web Element - Object Recognition using Relative Location to Other Web Elements

**URL:** <https://forum.katalon.com/t/web-element-object-recognition-using-relative-location-to-other-web-elements/45203>\
**Category:** Feature Request\
**Tags:** feature-request, katalon-studio\
**Created:** [July 2, 2020, 5:00pm UTC](https://forum.katalon.com/t/web-element-object-recognition-using-relative-location-to-other-web-elements/45203 "2020-07-02T17:00:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Edmondson](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@David\_Edmondson](https://forum.katalon.com/u/David_Edmondson)\
**Post date:** [July 2, 2020, 5:00pm UTC](https://forum.katalon.com/t/web-element-object-recognition-using-relative-location-to-other-web-elements/45203/1 "2020-07-02T17:00:15Z")

</div>

Web Element’s “Attributes” in Applications-Under-Test (AUT) evolve over time, resulting in Object Recognition Methods failing…

In most cases, regardless of which or how many of the Web Element’s attributes are selected to help identify it, the Web Element’s IDs, Names, Control Types or Control Names change, resulting in the Test Case failing…

However, the location on the AUTs Web Page of the Web Element remains consistent with other Web Elements on the AUTs Web Page…

If Katalon Studio had an Object Recognition Method to identify the Web Element which used the Web Element’s relative position to other Web Elements on the AUTs Web Page, then Test Cases might be more reliable over time…

* * *

“New” Object Recognition - Relative Location Attributes for “Web Element C”:

1. “Web Element C” is vertically in-line and below “Web Element A”
2. “Web Element C” is below and to the left of “Web Element B”
3. “Web Element C” is horizontally in-line and to the left of “Web Element D”

* * *

AUTs Web Page Layout of Web Elements:  
1234567890 “Web Element A” 12345678901234567890

123456789012345678901234567890 “Web Element B” 12345678901234567890

1234567890 “Web Element C” 12345678901234567890 “Web Element D” 12345

* * *

---

<div class="post-metadata">

**Author:** ![ThanhTo](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/thanhto/32/697_2.png) [@ThanhTo](https://forum.katalon.com/u/ThanhTo)\
**Post date:** [July 3, 2020, 6:20am UTC](https://forum.katalon.com/t/web-element-object-recognition-using-relative-location-to-other-web-elements/45203/2 "2020-07-03T06:20:45Z")

</div>

Hi @David_Edmondson

Thank you for your suggestion ! We have a Neighbor XPath that generally uses element’s neighbors to re-locate the element itself. Have you had any experience using it before ?

> **[Explore the Brand-new Katalon Studio's Smart XPath Generator](https://www.katalon.com/resources-center/blog/smart-xpath-generator/)**
>
> This article will introduce a brand-new XPath generator & intelligent method in Katalon Studio to automatically generate robust locators during the test recording phase.
