clickImage does not work

Before hitting that Ask the Community button, make sure to:

  • Search for similar topics to make sure it hasn’t been asked by another member;
  • Write your topic title as a question (if possible) - this help with search
  • Give as much context as possible (screenshots, videos, links, code blocks, etc.) - this help the community help you
  • Use the katalon-studio tag followed by other appropriate tags for better visibility and searchability.
  • Make sure to remove this pre-filled content before posting. :smiley:

Hello everyone,

I am currently using Katalon Studio 9.0.0, when I use the clickImage feature, I got the following error.

=============== ROOT CAUSE =====================
Caused by: java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path: /Users/dtran/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.

For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

10-27-2023 09:50:46 AM Test Cases/Meditek

Elapsed time: 9.669s

Test Cases/Meditek FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on image
	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.ClickImageKeyword.clickImage(ClickImageKeyword.groovy:90)
	at com.kms.katalon.core.webui.keyword.builtin.ClickImageKeyword.execute(ClickImageKeyword.groovy:67)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.clickImage(WebUiBuiltInKeywords.groovy:2740)
	at Meditek.run(Meditek:37)
	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:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:144)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:135)
	at TempTestCase1698421844737.run(TempTestCase1698421844737.groovy:25)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
Caused by: java.lang.UnsatisfiedLinkError: no jniopencv_core in java.library.path: /Users/dtran/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
	at com.googlecode.javacpp.Loader.loadLibrary(Loader.java:444)
	at com.googlecode.javacpp.Loader.load(Loader.java:368)
	at com.googlecode.javacpp.Loader.load(Loader.java:315)
	at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:131)
	at com.googlecode.javacpp.Loader.load(Loader.java:334)
	at com.googlecode.javacpp.Loader.load(Loader.java:315)
	at com.googlecode.javacv.cpp.opencv_core$CvArr.<clinit>(opencv_core.java:158)
	at org.sikuli.core.cv.ImagePreprocessor.createGrayscale(ImagePreprocessor.java:52)
	at org.sikuli.core.search.algorithm.TemplateMatcher.findMatchesByGrayscaleAtOriginalResolution(TemplateMatcher.java:18)
	at org.sikuli.api.ImageTarget.getUnordredMatches(ImageTarget.java:122)
	at org.sikuli.api.DefaultTarget.doFindAll(DefaultTarget.java:93)
	at org.sikuli.api.DefaultScreenRegion._find(DefaultScreenRegion.java:73)
	at org.sikuli.api.DefaultScreenRegion.find(DefaultScreenRegion.java:64)
	at com.kms.katalon.core.webui.common.ScreenUtil.findImage(ScreenUtil.java:121)
	at com.kms.katalon.core.webui.common.ScreenUtil.clickImage(ScreenUtil.java:39)
	at com.kms.katalon.core.webui.keyword.builtin.ClickImageKeyword$_clickImage_closure1.doCall(ClickImageKeyword.groovy:87)
	at com.kms.katalon.core.webui.keyword.builtin.ClickImageKeyword$_clickImage_closure1.call(ClickImageKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	... 16 more

From the first look at it, it seems like it can’t find the jniopencv_core, I tried to add the jar file javacv-1.5.9 to the Classpath Variable but I don’t think it’s fixing the issue. Can I get some help?

1 Like

@duyluong @albert.vu

@dtran

Which type of OS are you using? Linux?

Which version of JDK have you installed on your Linux?

Katalon Studio v9.0.0 on Linux requires you to install the Open JDK 17 specifically. Have you done that?

@dtran,

I think this is a known bug of Katalon Studio v9.0 with macOS ARM: Katalon Studio Release Notes: Version 9.x | Katalon Docs

  • Error java.lang.UnsatisfiedLinkError when running WebUI.verifyImagePresent keyword with Katalon Studio for macOS (Apple Silicon). Workaround: Download and use Katalon Studio for macOS (Intel) instead.

cc: @xuan.tran @Shin