Hello,
Due to the way my application works, some items on screen load before others. Some of the attributes of these slow loading elements change depending on wether they have loaded or not. I want to create a custom method which will check the status of these elements and delay execution until they are ready to be interacted with. I have tried wait until element is visible/present and they do not work.
For some reason, my code is not working though, any ideas? I really am not sure what I am doing wrong
@Keyword
def waitForAttributeToLoad(String webObjectXpath, String attributeToCheck, String expectedLoadingCompleteText)
{
//create a new webObject
TestObject objectToCheck = new TestObject()
//Give the webObjects a path locator (This is where it is failing)
objectToCheck.addProperty("xpath", ConditionType.EQUALS, webObjectXpath)
//Check that the webobject has the completed loading attribute, if not, delay execution for 2 seconds
while((WebUI.verifyElementAttributeValue(objectToCheck, attributeToCheck, expectedLoadingCompleteText, 1)) == false)
{
WebUI.delay(2)
}
}