# modifyObjectProperty

**URL:** <https://forum.katalon.com/t/modifyobjectproperty/6309>\
**Category:** Web Testing\
**Tags:** katalon-studio\
**Created:** [May 19, 2017, 6:55pm UTC](https://forum.katalon.com/t/modifyobjectproperty/6309 "2017-05-19T18:55:21Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Jonathan\_Moore](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@Jonathan\_Moore](https://forum.katalon.com/u/Jonathan_Moore)\
**Post date:** [January 30, 2018, 12:33am UTC](https://forum.katalon.com/t/modifyobjectproperty/6309/9 "2018-01-30T00:33:40Z")

</div>

Hi, The docs at [https://docs.katalon.com/display/KD/[WebUI]+Modify+Object+Property](https://docs.katalon.com/display/KD/%5BWebUI%5D+Modify+Object+Property)  
still say eg:

```auto
new_btn = WebUI.modifyObjectProperty(findTestObject('Page_Login/btn_Login'), 'xpath', 'equals', '//*[@type=\"button\"]', false)

```

`however it seems this first finds the object without modifying the xpath, and the comment above says "`calling the modified object should not contain _`findTestObject`_ " - so what would be the correct code?

--------------------  
on further testing, I got a working code like:

```auto
TestObject dynamicObject = new TestObject('dynamicObject').addProperty('xpath', com.kms.katalon.core.testobject.ConditionType.EQUALS, newXPath, true)
WebUI.waitForElementVisible(dynamicObject, 3)

```

creating a new object rather than getting a TestObject from the repository and modifying it.

I didn’t find this type of usage in the documentation, just guesswork and hints on the forums, so it would be good to have some clarification about which is the recommended syntax.

---

_[View the full topic](https://forum.katalon.com/t/modifyobjectproperty/6309)._
