My app uses traffic-light styled images to report success of message sending back to the user.
HTML of the images is something like this:
<img src="images/green.gif" border="0" style="width: 15px; height: 15px; position: relative; left: -1px; top: 1px;">
<img src="images/orange.gif" border="0" style="width: 15px; height: 15px; position: relative; left: -1px; top: 1px;">
<img src="images/red.gif" border="0" style="width: 15px; height: 15px; position: relative; left: -1px; top: 1px;">
So, when you click a button that sends the message, the image remains orange for a while and then changes to either red or green.
However, although "images/green.gif" is the source attribute shown in Chrome Dev Tools, when I hover over the element I can see that the full src is something like "https://myapp.com/production/images/green.gif" where the first part of the URL changes depending on the server used.
Now, I would like to do this in Katalon Studio script:
TestObject myTestObject = new TestObject('My test object').addProperty('css', ConditionType.EQUALS, '.some-class-name img')
WebUI.waitForElementAttributeValue(myTestObject, 'src', 'images/green.gif', 30)
However, Katalon will see the 'src' attribute of the image with the full name so this will timeout after 30 seconds.
Is there a way to wait until the attribute contains a certain string?