This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/webui-verify-all-links-on-current-page-accessible.html
This is a companion discussion topic for the original entry at https://docs.katalon.com/katalon-studio/docs/webui-verify-all-links-on-current-page-accessible.html
Its not clear from the documentation how to return/store/otherwise manipulate failed links.
Its a great little implementation but presently all the intelligence is opaque ie which links failed.
Please inform if thereās a way to filter the failed links - preferably return hrefs/URL values.
I want to ask what kind of ālinksā does this function check. Does it check the external web links? Thanks!
I confirm the inaccessible link is listed in the logs (see bellow), but I agree with @ze2: this is too opaque to use.
I am getting feedback that a certain linkedin link is inaccessible, but actually it is. What is āinaccessibleā anyway?
-
links to a page that does not exist?
-
the anchor is not clickable because of another element being on top of it? etc
I also want to point out an error that seems really embarasing:
Why does this Katalon function need an object named āTemporary RESTful request objectā?
Is it some leftover from the implementation, is this how much test Katalon gets before being shipped? (I will continue to get involved more in the beta version testing process)
If this object is indeed needed, why isntāit mentioned in the documentation, and what itās purpose is.
Thank you.
Cornel
I am testing this exact example ( verify if all links on āhttp://demoaut.katalon.comā are accessible) but it doesnāt work for me. Any idea?
Thank you!
Unable to verify all links on the page āhttps://katalon-demo-cura.herokuapp.com/ā are accessible (Root cause: com.kms.katalon.core.exception.StepFailedException: Unable to verify all links on the page āhttps://katalon-demo-cura.herokuapp.com/ā are accessible 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.VerifyAllLinksOnCurrentPageAccessibleKeyword.verifyAllLinksOnCurrentPageAccessible(VerifyAllLinksOnCurrentPageAccessibleKeyword.groovy:48) at com.kms.katalon.core.webui.keyword.builtin.VerifyAllLinksOnCurrentPageAccessibleKeyword.execute(VerifyAllLinksOnCurrentPageAccessibleKeyword.groovy:32) at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:60) at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyAllLinksOnCurrentPageAccessible(WebUiBuiltInKeywords.groovy:3754) at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyAllLinksOnCurrentPageAccessible$0.call(Unknown Source) at AA - Verify links.run(AA - Verify links:24)
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.TestCaseMain.runTestCase(TestCaseMain.java:114)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:105)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1583136602240.run(TempTestCase1583136602240.groovy:23)
Caused by: com.kms.katalon.core.exception.StepFailedException: Some of links on the current page are inaccessible at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64) at com.kms.katalon.core.webui.keyword.builtin.VerifyAllLinksOnCurrentPageAccessibleKeyword$_verifyAllLinksOnCurrentPageAccessible_closure1.doCall(VerifyAllLinksOnCurrentPageAccessibleKeyword.groovy:45) at com.kms.katalon.core.webui.keyword.builtin.VerifyAllLinksOnCurrentPageAccessibleKeyword$_verifyAllLinksOnCurrentPageAccessible_closure1.call(VerifyAllLinksOnCurrentPageAccessibleKeyword.groovy) at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20) ā¦ 17 more
)
Anyone facing this issue? Any idea about what is going on with this basic example?
Thank you!
Hi, I get also that āUnable to verify all links on the page āhttps://katalon-demo-cura.herokuapp.com/ā are accessibleā error message. Any help?
Thank you
Try this, Iām not sure that is correct, but it works:
@Then (āI get all links on pageā)
def I_get_all_links_on_page() {
List list = WebUI.getAllLinksOnCurrentPage(true, [])
println("Links on current page: " + list.size())
GlobalVariable.list_1 = list
}
@Then (āI verify links accessibleā)
def I_verify_links_accessible() {
WebUI.verifyAllLinksOnCurrentPageAccessible(true, GlobalVariable.list_1)
}
what if i want to get all a href links of a search results page of google ?
It looks similar to