Closed HoudayerPierre closed 1 year ago
Sorry for the inconvenience, but I did not do anything to test in a Ruby env since years.
What version of SikuliX?
Please more info on your environment. I have available Windows 11, macOS Intel/Mx and Ubuntu 22.04.
Using last SikuliX 2.0.5, Windows 10&11, java version "1.8.0_181". Lots of python libs are dropping python 2.7 (like selenium, splinter...) so just testing JRuby as it seems to be more alive (last Ruby 3.2, JRuby 9.4.0.0 -> Ruby 3.1). I will prefer a Jython 3 but seems to be dead.
@HoudayerPierre Thanks for the info. I agree, that it is worth to give Ruby a new chance. Another option (also left behind :-( is to make the SikuliX features available in real Python
I think SikuliX features available in real Python (&Ruby) will be better as we can use C extensions required in some other libs and frameworks it's very limited/unavailable in Jython/JRuby.
@HoudayerPierre Thanks for feedback. I will surely not implement the SikuliX features in Python or Ruby. There are Python-to-Java bridges available. My favorite is https://github.com/py4j/py4j (already played with it - works https://github.com/RaiMan/sikulix4python). Another one is https://github.com/jpype-project/jpype.
Another possibility is to run SikuliX as a server with a Restful API, which in turn could be wrapped in a native API in any environment/language. The base for such a server is available, but currently not useable.
The 2.0.6 will have support for JRuby 9.4.x (currently busy with the setup).
Thanks for your tips and your work, https://github.com/adrian-evo/robotframework-sikulixlibrary (as RF is opt.) I think it seems to be what I need for using SikuliX with python 3+ via py4j or jpype.
@HoudayerPierre Great thanks for this tipp. Looks promising. I will have a look into it and see how to make it work with 2.0.6 (still snapshot ;-)
Would be fine to hear from you again on success (preferably: sikulix---at---outlook---dot---com)
@HoudayerPierre The Python case now has a follow-up at: https://github.com/RaiMan/SikuliX1/issues/570
Hello, I playing with JRuby as it seems to be a bit more supported for the latest version of ruby (3.1) as Jython is still in 2.7.3. So I just adding some libs in JRuby 9.4.0.0 (BTW the 9.4.1.0 seems to hangs with sikuli)
I have installed gems like this :
java -jar jruby-complete-9.4.0.0.jar -S gem install -i .\gemsdl webdrivers selenium-webdriver jruby-win32ole capybara
jar uf jruby-complete-9.4.0.0.jar -C gemsdl .
and run this simple code :
Result :
I think there is a confilt with capybara & sikuli on
click_button
orCapybara::click_button
(BTW, whyerror at line --unknown--
?)