Mate Mrse said:
Now I noticed that the Selector Editor shows your html_Bronto element isn’t defined properly, there are some brackets missing.
If you are changing a property, you could check the new value using WebUI.getAttribute() or WebUI.getCSSValue().
Hi Mate
Thank you again for your advice earlier. It has taken me some time, but i now have tried both options recommended above.
Sorry for the long post.
I found a good example to demonstrate. It is a “From” link in the inbox. In this specific case - the “xpath” is being changed every time user clicks on the object. However the “name” property always stays the same.
Modifying test object:
new_email = WebUI.modifyObjectProperty(findTestObject(‘Page_Gmail/span_CPC410437’), ‘name’, ‘equals’, ‘CPC410437’, false)
WebUI.waitForElementVisible(new_email, 15)
WebUI.click(new_email)
Error:
_Unable to click on object ‘Object Repository/Page_Gmail/span_CPC410437’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Page_Gmail/span_CPC410437’ located by 'By.xpath: ’ not found)
_
Note: At this point the test object property does get modified.
Adding a new test object:
TestObject dynamicObject = new TestObject(‘Page_Gmail/dynamicObject’).addProperty(‘name’, com.kms.katalon.core.testobject.ConditionType.EQUALS, ‘span_CPC410437’, false)
WebUI.waitForElementVisible(dynamicObject, 5)
WebUI.click(dynamicObject)
Error:
Unable to click on object ‘Page_Gmail/dynamicObject’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Page_Gmail/dynamicObject’ located by 'By.xpath: ’ not found)
Here is the properties of this object:
Thank you
Andrew
Inbox_From_Link.png
Inbox_From_Link_property.png