I know that how we can use Sikuli in Java. But I have some code in Python which is automating a web application, and I want to use Sikuli in it. I searched a lot on the Internet about how we can use Sikuli in Python. But I did not find any good resource related to it.
How can I import Sikuli script in a Python project in Eclipse? When I added the sikuli-script.jar file in the Python path in Eclipse and when I am trying to use
import * from sikuli
Then I am getting "there is no such type of module named sikuli".
Sikuli is a tool written in Java and hence you can't use it in your Python code as is. Instead you have the option to use it within a Jython environment, that provides you the Python syntax and enables running jar packages. If you are not using many third party Python libraries and mainly stick to the generic functionality, you shouldn't get into too much trouble transferring from pure Python to Jython.
There are clear instructions of how to use Sikuli with Jython on SikuliX official website. If you have any related questions, you can post the here.
Related
I'm trying to use the pyodbc package on Sikuli IDE, but I'm running into some issues because it seems that Sikuli cannot identify pyd files.
I placed the pyd file in the Sikulix\Lib folder, but when I try to import it, I keep getting the message "No module named pyodbc".
with SikuliX (since it is jython/java based) only pure python language modules or modules ported to Jython can be used.
Modules like pyodbc contain C-based stuff or depend on native libs - not posible to use with SikuliX
RaiMan (developer of SikuliX)
I am using netbeans 8.2 with python plugin 8.1. I want to code in jython with using biopython library.
Kindly tell me whether it's possible or not if so than how ?
As far as I see, Biopython libraries are libraries written for Python (and so, in C, C++ or FORTRAN).
You cannot run them directly from Jython because Jython is "Python for Java" - a project where Python language was re-implemented. Jython Documentation mentions:
Unlike the CPython distribution, Jython does not include built-in libraries written in C as they will not work on the Java platform. Instead, there are certain libraries that have been re-written in the Java languages to be included with Jython
But if you also have a Python interpreter installed on your machine, you could run your Python interpreter via commandline. You could also think about invoking Python interpreter via Java exec command from your Jython project, and collect the result, to provide it in a way that you can continue in Jython after fetching the result from Python.
Our Automation framework is implemented using the Robot Framework in Jython, can anyone suggest how I can use RIDE for writing my testcases. Currently I am using Eclipse as an editor.
RIDE and RobotFramework are two different things. RIDE is an IDE (Robot IDE) which talks to the Framework. If you want to use RIDE to create your testcases just download and install RIDE, and then run them within RIDE.
But because you're already using an IDE, just run the tests outside within a terminal using:
jybot TestCase.robot
or
robot TestCase.robot
You don't need RIDE in order to use the Robot Framework. They are two seperate things.
EDIT
According to the Git page of RIDE it states that:
RIDE runs only on the regular Python, not on Jython nor IronPython. Python 2.6 is the minimum version. Notice that similarly as Robot Framework, RIDE does not yet support Python 3. Notice also that on OS X RIDE requires 32-bit Python version.
So - in your case - you will not be able to use RIDE as you are working on a Jython Environment. If you want to absolutely use RIDE, you will have to switch over to Python. I would recommend Python 2.7.x
As clearly stated by #Goralight, the IDE and Robot Framework are two different topics. The IDE is used to Create the Robot files, RBF is used to Execute those Robot files.
An IDE like RIDE will also have functionality to start RBF from within the IDE but that is just a replacement of the commands mentioned by #Goralight. So in that sense it's an automation, not an integral part of the IDE.
Just as a side note, in case you're inan Eclpse based situation to have a closer look at RED that is a full featured IDE that can be loaded into your existing Eclipse instance as a Marketplace feature or as a full separate standalone download from GitHub.
I have done the integration of Sikuli with the Selenium now jut wanted to know if there is a link where I can learn all the commands I can use using Sikuli with Selenium. I tried googling and I learned about "App" commands is there any other document or link where i can learn more about commands that can be used.
Take a look at Sikuli documentation
It is the official site for Sikuli, and has pretty much all you need to know about Sikuli.
I am new to automation and have to use Sikuli, can you all tell me how to export Sikuli script in java also is it possible to integrate those scripts with Selenium....
Thanks in advance.....
"export" scripts to Java is not possible in this sense, since Sikuli scripts are written in Python scripting language and the scripts itself are run using the Jython interpreter (Java base implementation of Python language).
But since the the essential Sikuli features are implemented using Java, you might transcript/translate a script to Java code, since the Sikuli functions are nearly identical on the Python API level and the Java API level.
But if you have more complex Sikuli Scripts, that you want to run from Java code, there are options to do that:
run the script like from command line, but in a subprocess
run the script using Sikuli's ScriptRunner