Re: [Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-16 Thread RaiMan
Question #708961 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/708961

RaiMan proposed the following answer:
Sorry, but I already removed Katalon from my system. For my possible use
cases too complicated (IntelliJ IDEA is enough for me).

If I remember well:
- started a new project (for Windows Desktop?)
- added a new testcase
- in the project settings added the SikuliX jar in the library section
- added my script statements in the test case script tab

... and run the test case

... sometimes having the above mentioned problems and workarounds.

again: I did not extra add the jna-jar in the settings lib section!

hope it helps.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-15 Thread Marie Belle Salloum
Question #708961 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/708961

Marie Belle Salloum posted a new comment:
I'm trying now with version 2.0.6 as you suggested but it's not working for me 
now, I'm not able to run the script now.
Can you inform me what settings did you modify? and what type of project did 
you choose?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-15 Thread RaiMan
Question #708961 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/708961

RaiMan proposed the following answer:
I got both jars to run: API-2.0.5 and IDE-2.0.6

But on the way I had some problems with Catalan Studio:
- could not remove the actual SikuliX lib - had to do it manually outside
- after some errors a Run did not do anything any more - just started and 
terminated
- after some error situations, the script-tab in the editor did not show anymore

I switched off the "auto restore" on exit.
After having done some changes in the project setup and if the RUN then simply 
terminated without doing anything, I exited Catalan and started again.
After opening the test case again, I at least succeeded in running some SikuliX 
features.

my script additions:
--
import org.sikuli.script.Screen as Screen
import org.sikuli.script.Match as Match
import org.sikuli.script.ImagePath as ImagePath

//System.getProperty('user.dir'); 
//ImagePath.add  does not work: intervening spaces are internally converted to 
%20 (is surely a SX bug)
String udir = "C:/Users/rmhde/_SXRun"; 
String images = "/katalon"
System.out.println(udir)

ImagePath.add(udir + images)
//ImagePath.dump("") //only works in 2.0.6

Screen s = new Screen()
s.hover() // moves to screen center

Match m = s.exists("img");
System.out.println(m);

s.click(m.offset(22, 0)) 
// moves to the 

System.out.println(s)
---

Conclusion: principally works with 2.0.5 and 2.0.6

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-15 Thread Marie Belle Salloum
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.(SXUser32.java:13)
at org.sikuli.natives.WinUtil.(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.(Finder.java:538)
at org.sikuli.script.Finder$FindInput2.(Finder.java:1167)
at org.sikuli.script.Finder.(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.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-15 Thread RaiMan
Question #708961 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/708961

RaiMan proposed the following answer:
That's interesting.

When I had a short look into Catalan yesterday, I did not realize, that they 
mention SikuliX.
So I decide it is worth to have a deeper look.

If we have a chance to get it to work, then with 2.0.5
But you might as well give the 2.0.6-prefinal a chance. (see below)

I guess your problem is a class-path problem: There seem to be different JNA 
versions on the classpath.
So at least, you should test with no extra import of JNA.

Test with 2.0.6 (details:   https://github.com/RaiMan/SikuliX1):
Use this jar (it is the IDE, but contains the API as well) as the one to be 
imported:
https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots=com.sikulix=sikulixidewin=2.0.6-SNAPSHOT=jar

reduce the testcase to the minimum script, that produces the error and
send me script and additional info to my mail sikulix---at---outlook---
dot--com. A stack trace at the crash point would be helpful and a full
list of the classpath.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-15 Thread Marie Belle Salloum
Question #708961 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/708961

Marie Belle Salloum posted a new comment:
Hey RainMan,

Katalon is an automation testing tools that uses groovy and selenium in
order to create the test cases, so for most of test cases we need to add
JNA library as an additional library.

What I'm trying to do is to integrate between Sikuli and Katalon, which is 
something that can be done as shown in their websites here:
https://docs.katalon.com/docs/katalon-platform/integrations/sikulix

I've added sikulix jar file downloaded here from launchpad, I tried
several versions of sikulix with several versions of JNA libraries to
check, and they're all giving me the same error.

Can you please advise

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-12 Thread RaiMan
Question #708961 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/708961

Status: Open => Answered

RaiMan proposed the following answer:
Since I do not know the Katalon eco-system, I do not know, in which way
you use SikuliX 2.0.5.

- if it is sikulixapi from Maven Central, then it's POM references JNA
5.6.0

- if it is a complete jar including all dependencies (e.g. sikulixide),
then it already contains JNA

If you tell me more about what you are doing at the place where you get
the error, I could try to help you further.

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


[Sikuli-driver] [Question #708961]: JNA and Sikulix Compatibility Error

2024-01-11 Thread Marie Belle Salloum
New question #708961 on SikuliX:
https://answers.launchpad.net/sikuli/+question/708961

I'm using the integration of Sikulix into Katalon Studio, I'm doing it as 
recommended on katalon studio but I'm getting an error:
"ERROR c.k.katalon.core.main.TestCaseExecutor   - ❌ 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;"

jna version: 5.7.0
sikulix version: 2.5.0

Can you please advise if they are compatible or not, and if not which versions 
should I choose?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp