sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #59259
Re: [Question #708961]: JNA and Sikulix Compatibility Error
Question #708961 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/708961
Marie Belle Salloum posted a new comment:
I tried it using 2.0.6, the jar that you added in the link above, it
didn't work, it even stopped me from getting the function to work as if
I don't have any code lines at all.
the testcase I'm doing is this:
"
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testng.keyword.TestNGBuiltinKeywords as TestNGKW
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
import org.sikuli.script.Key as Key
import org.sikuli.script.Screen as Screen
import org.sikuli.script.FindFailed as FindFailed
import org.sikuli.script.ImagePath as ImagePath
ImagePath.add(System.getProperty('user.dir') + '\\Sikuli')
Screen s = new Screen()
s.find('Search.PNG')
s.click('Search.PNG')
"
I had to revert the JNA version to 4.1.0 and sikulix version to 2.0.4 for it to show up as a function.
This is the error log:
"
01-15-2024 04:10:45 PM Test Cases/DPI_Automation/PcapGeneration/SikuliTest
Elapsed time: 4.251s
Test Cases/DPI_Automation/PcapGeneration/SikuliTest FAILED.
Reason:
java.lang.NoSuchMethodError: com.sun.jna.Native.load(Ljava/lang/String;Ljava/lang/Class;Ljava/util/Map;)Lcom/sun/jna/Library;
at org.sikuli.natives.SXUser32.<clinit>(SXUser32.java:13)
at org.sikuli.natives.WinUtil.<clinit>(WinUtil.java:495)
at org.sikuli.script.support.RunTime.addToWindowsSystemPath(RunTime.java:1462)
at org.sikuli.script.support.RunTime.libsExport(RunTime.java:1403)
at org.sikuli.script.support.RunTime.libsLoad(RunTime.java:1232)
at org.sikuli.script.support.RunTime.loadLibrary(RunTime.java:1434)
at org.sikuli.script.Finder$Finder2.<clinit>(Finder.java:538)
at org.sikuli.script.Finder$FindInput2.<clinit>(Finder.java:1167)
at org.sikuli.script.Finder.<init>(Finder.java:34)
at org.sikuli.script.Region.doCheckLastSeenAndCreateFinder(Region.java:2907)
at org.sikuli.script.Region.checkLastSeenAndCreateFinder(Region.java:2868)
at org.sikuli.script.Region.doFind(Region.java:2797)
at org.sikuli.script.Region.find(Region.java:2275)
at org.sikuli.script.Region$find.call(Unknown Source)
at SikuliTest.run(SikuliTest:28)
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 com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1705327838862.run(TempTestCase1705327838862.groovy:25)
"
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.