Hi,
I’m trying to establish small script which will work in loop. The case is to open webpage and check if element (defined by xpath) exist on web page. If not - lets reload webpage and check again. If not - refresh and… If element will be present - go to next step (perhaps to click it - but it’s easy ;)).
Been digging a bit and the best what I found is to work something easy like
while (WebUI.verifyElementPresent(findTestObject('test_page//button_reservation'), 1)) { WebUI.refresh()}
But it’s returning error like
Unable to verify object 'test_page/button_reservation' is present (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: 'test_page/button_reservation' located by 'By.xpath: .//*[@type="submit"]' not found)
And the page is not refreshed.
My inspiration for while was script which is executed well:
int varA = 2
while (varA == true){
webUiBuiltInKeywords.acceptAlert(FailureHandling.STOP_ON_FAILURE)}
Would be lovely to get any suggestion