Documentation says timeOut parameter is accepted by verifyElementVisible.
However, when I run the command with time out, like this:
WebUI.verifyElementVisible(findTestObject('Object Repository/X'), 5, FailureHandling.OPTIONAL
I get the following error message:
Test Cases/TC-00X FAILED because (of) groovy.lang.MissingMethodException: No signature of method: static com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementVisible() is applicable for argument types: (com.kms.katalon.core.testobject.TestObject, java.lang.Integer, com.kms.katalon.core.model.FailureHandling) values: [TestObject - 'Object Repository/X', ...]
Possible solutions: verifyElementVisible(com.kms.katalon.core.testobject.TestObject, com.kms.katalon.core.model.FailureHandling), verifyElementVisible(com.kms.katalon.core.testobject.TestObject), verifyElementNotVisible(com.kms.katalon.core.testobject.TestObject, com.kms.katalon.core.model.FailureHandling), verifyElementNotVisible(com.kms.katalon.core.testobject.TestObject)
2 Likes
I found a workaround, in case anyone is interested. Well, not exactly a workaround for this precise case, but for me it worked out fine: I used
[verifyElementInViewport](https://api-docs.katalon.com/com/kms/katalon/core/webui/keyword/WebUiBuiltInKeywords.html#verifyElementInViewport(TestObject, int, com.kms.katalon.core.model.FailureHandling) “Link: https://api-docs.katalon.com/com/kms/katalon/core/webui/keyword/WebUiBuiltInKeywords.html#verifyElementInViewport(TestObject, int, com.kms.katalon.core.model.FailureHandling)”)(TestObject to, int timeOut, FailureHandling flowControl)
(there’s also [verifyElementVisibleInViewport](https://api-docs.katalon.com/com/kms/katalon/core/webui/keyword/WebUiBuiltInKeywords.html#verifyElementVisibleInViewport(TestObject, int, com.kms.katalon.core.model.FailureHandling) “Link: https://api-docs.katalon.com/com/kms/katalon/core/webui/keyword/WebUiBuiltInKeywords.html#verifyElementVisibleInViewport(TestObject, int, com.kms.katalon.core.model.FailureHandling)”)(TestObject to, int timeOut, FailureHandling flowControl), but it is deprecated).
I needed to shorten the timeout for verifyElementVisible (it always defaulted to 30 seconds). I could have used verifyElementPresent, but it isn’t exactly the same.
Hi Mate
Why not waitForElementVisible?
My guess is, the documentation error was likely due to a copy/paste error from this method.
Hi Russ
My AUT sometimes has a popup (actually, it is an iframe), but more often than not it is not present. If it is present, I want to fill some combo boxes and submit.
But, since this usually happens only on the first test run, I didn’t want to use any waits, to shorten the run time.
“Random popups”. Great.
Perhaps suggest to the developers a “no notifications” mode so testing can be conducted again the AUT in a more rigorous manner.
The documentation error of WebUI.verifyElementVisible() is annoying people.
@Katalon team
Please correct the documentation at https://docs.katalon.com/display/KD/[WebUI]+Verify+Element+Visible
The doc says 2nd argument is required as int timeout; but actually not.
3 Likes