Hey Guys,
im currently fighting with the problem that the declared variable, still has the old property of the object.
Here is my code:
def new_TF22 = WebUI.modifyObjectProperty(findTestObject('blub'), 'xpath', 'equals', '//div[contains(@id, "hazardSubstance_symbols")]/ul/li/input', false)
WebUI.click(new_TF22)
WebUI.setText(new_TF22, 'GHS 01')
And here is my Console Log..
05-30-2018 11:34:36 AM - [START] - Start action : Statement - new_TF22 = com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.modifyObjectProperty(com.kms.katalon.core.testobject.ObjectRepository.findTestObject(Blub), "xpath", "equals", "//div[contains(@id, "hazardSubstance_symbols")]/ul/li/input", false)
05-30-2018 11:34:36 AM - [INFO] - Finding Test Object with id 'Blub'
05-30-2018 11:34:36 AM - [INFO] - Check Test Object
05-30-2018 11:34:36 AM - [INFO] - Check property name
05-30-2018 11:34:36 AM - [INFO] - Cannot find property with name 'xpath' in test object 'Blub'. Creating new property with name 'xpath'
05-30-2018 11:34:36 AM - [INFO] - Check modify value
05-30-2018 11:34:36 AM - [INFO] - Check match condition
05-30-2018 11:34:36 AM - [PASSED] - Modify property of object successfully
05-30-2018 11:34:36 AM - [END] - End action : Statement - new_TF22 = com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.modifyObjectProperty(com.kms.katalon.core.testobject.ObjectRepository.findTestObject(Blub), "xpath", "equals", "//div[contains(@id, "hazardSubstance_symbols")]/ul/li/input", false)
05-30-2018 11:34:36 AM - [START] - Start action : click
05-30-2018 11:34:36 AM - [INFO] - Checking object
05-30-2018 11:34:36 AM - [INFO] - Checking timeout
05-30-2018 11:34:36 AM - [INFO] - Finding web element with id: 'Blub' located by 'By.xpath: //div[contains(@id, "hazardSubstance_hazardRatings")]/ul/li/input
It doesn’t make any sense, I also tried it with “true” and “false” as condition, the issue is the same (not that you wonder, why i picked false here).
Is this a bug, or am I missing something?
Or is the xpath not right? I wrote the xpath, as if I would do it in the Object Repository.
The Log states that it’s modified succesfully and picks up the old xpath, when I work with the new set variable.
Thanks in advance for your help!