# Element locator 'not found' in SAP apps

**URL:** <https://forum.robotframework.org/t/element-locator-not-found-in-sap-apps/8005>\
**Category:** Robot Framework\
**Created:** [24 October 2024 01:57 UTC](https://forum.robotframework.org/t/element-locator-not-found-in-sap-apps/8005 "2024-10-24T01:57:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nowtoknow](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@nowtoknow](https://forum.robotframework.org/u/nowtoknow)\
**Post date:** [24 October 2024 01:57 UTC](https://forum.robotframework.org/t/element-locator-not-found-in-sap-apps/8005/1 "2024-10-24T01:57:19Z")

</div>

Hello, I’m new to Robot Framework,  
I’m trying to automate data input in a SAP program, but I’ve run into an issue where elements in the main area can’t be located, while there’s no problem with the elements in the menu (navbar). The elements are unique, and I’ve even tried using nested locators, but nothing seems to work.  
Do you have any suggestions?

Here’s the exception I’m getting:  
Exception has occurred.  
Suspended due to logged failure: Element with locator ‘xpath=//table/tbody/tr/td/div/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/table/tbody/tr[3]/td/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/div/div/div/div/table/tbody/tr[1]/td/div/div/table/tbody/tr/td[2]/span/span[@id=“WD4B-btn”]’ not found.

i has attach image, the red area is the element i cant locate, the wording with red underline is the element i want to click. after click will reveal 2 choice i need to click (functional location, equipment).

 ![Screenshot 2024-10-24](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/5/5d521fc1ae3c45204e671e661891f470d2ae3f6b.jpeg)

Thanks before

---

<div class="post-metadata">

**Author:** ![alex\_duty](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/alex_duty/32/4593_2.png) [@alex\_duty](https://forum.robotframework.org/u/alex_duty)\
**Post date:** [25 February 2025 20:00 UTC](https://forum.robotframework.org/t/element-locator-not-found-in-sap-apps/8005/2 "2025-02-25T20:00:31Z")

</div>

please provide us some detail, maybe what kind and version of SAP is this. for me is quite surprising the xpath, there should be an ID, at least which I used has it…  
for that there is a quite good program: scripting tracker, it can reverse engineer the ID for you.  
other thing is:

- this: //table/tbody/tr/td/div/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/table/tbody/tr[3]/td/table/tbody/tr/td/div/table/tbody/tr[1]/td/table/tbody/tr/td/div/div/div/div/div/table/tbody/tr[1]/td/div/div/table/tbody/tr/td[2]/span/span[@id=“WD4B-btn”]
- could be just: //span[@id=“WD4B-btn”]  
really no need to the longer one, it just hard to maintain.  
and one more thing: kind of weird that a table has dropdown as td
