Issue with Verify Element Not Visible/InViewport

Operating System

  • Windows 10 Pro

Katalon Studio Version

  • 7.3.0

Environment (for Web testing):

  • Chrome Version 80.0.3987.149
  • Firefox Version 74.0

With my testing, I am clicking checkboxes and then clicking save. Afterward, there is a temporary pop up notification of the save being successful. I am trying to write my test to wait for this element to disappear from the viewport before moving on to the next step. In script mode I started to type WebUI.verifyElementNotVisibleInViewport but then got the following message:

Deprecated. As of Katalon version 3.7.0.0, replaced by keyword com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementNotInViewport.

I then try to use WebUI.verifyElementNotInViewport and get the following:

04-13-2020 11:06:15 AM verifyElementNotInViewport(findTestObject(“ManipulateSecMan/EditMobileTimecardRole/SuccessMessage”), 10)

Elapsed time: 2.313s

Unable to verify if object ‘Object Repository/ManipulateSecMan/EditMobileTimecardRole/SuccessMessage’ is not visible in viewport (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to verify if object ‘Object Repository/ManipulateSecMan/EditMobileTimecardRole/SuccessMessage’ is not visible in viewport
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotVisibleInViewportKeyword.verifyElementNotVisibleInViewport(VerifyElementNotVisibleInViewportKeyword.groovy:85)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotVisibleInViewportKeyword.execute(VerifyElementNotVisibleInViewportKeyword.groovy:68)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:72)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementNotInViewport(WebUiBuiltInKeywords.groovy:3129)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementNotInViewport$8.call(Unknown Source)
at EditMobileTimecardRole.run(EditMobileTimecardRole:45)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:169)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:142)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:91)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1586790351513.run(TempTestSuite1586790351513.groovy:36)
Caused by: com.kms.katalon.core.exception.StepFailedException: Object ‘Object Repository/ManipulateSecMan/EditMobileTimecardRole/SuccessMessage’ is present but is visible in viewport
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotVisibleInViewportKeyword$_verifyElementNotVisibleInViewport_closure1.doCall(VerifyElementNotVisibleInViewportKeyword.groovy:76)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementNotVisibleInViewportKeyword$_verifyElementNotVisibleInViewport_closure1.call(VerifyElementNotVisibleInViewportKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
… 19 more

So Katalon is not waiting for the 10 seconds I am setting for timeout, which it should because timeout is a required variable.

I also noticed that Verify Element Visible has a required timeout variable, but Verify Element Not Visible does not have a timeout. It seems to me there should be some uniformity with these very similar keywords. I would like some clarification on some of these Keywords if possible? Thank you.

The message sais

Deprecated. As of Katalon version 3.7.0.0, replaced by keyword com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementNotInViewport

Also you can read the API documentation of Katalon Studio.

There you can find com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords class and its methods (some of them are deprecated).

What else do you want to be told?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.