# Unable to retreive xpath from object repository during script

**URL:** <https://forum.katalon.com/t/unable-to-retreive-xpath-from-object-repository-during-script/49820>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [December 2, 2020, 4:37pm UTC](https://forum.katalon.com/t/unable-to-retreive-xpath-from-object-repository-during-script/49820 "2020-12-02T16:37:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mfoos](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mfoos/32/16103_2.png) [@mfoos](https://forum.katalon.com/u/mfoos)\
**Post date:** [December 2, 2020, 6:13pm UTC](https://forum.katalon.com/t/unable-to-retreive-xpath-from-object-repository-during-script/49820/2 "2020-12-02T18:13:14Z")

</div>

Updating this, found another thread on the forum. Link below. The answer appears to be that I need to use expression language which I don’t have a lot of experience with but it seems to be working now.

> [@Get Object Properties from Object Repository](http://forum.katalon.com/t/get-object-properties-from-object-repository/13399):
>
> Hi, well im trying to get the object properties from Object Repository . Eg. I have a object in Object Repository like “Button” and with property of Xpath. I just want to read this Xpath value. Is there any way i can do this ? Im not creating run time object object already available in the Object Repository . I have done where we have object during the run time but I want to do this from Object Repository For the run time object : myTestobjet. getPreoperties();

Updated code -

WebDriver driver = DriverFactory.getWebDriver();

Actions actions = new Actions(DriverFactory.getWebDriver());

TestObject eLoadSupplierMasterData = findTestObject(‘Object Repository/Engine Execution Log/Engine Execution Request - Processes To Execute/Processes to Execute - Load Supplier Master Data’);

actions.keyDown(Keys.LEFT\_CONTROL)  
.click(driver.findElement(By.xpath(“${eLoadSupplierMasterData.findPropertyValue(‘xpath’)}”)))   
.keyUp(Keys.LEFT\_CONTROL)  
.build()  
.perform();

---

_[View the full topic](https://forum.katalon.com/t/unable-to-retreive-xpath-from-object-repository-during-script/49820)._
