There are three .Net wrappers for Sikuli.
Personally, I was a bit disappointed in all of them.
Edit: there was a small bug in SikuliSharp which was causing commands to Sikuli to fail. Now that this is working, I'm a happy SikuliSharp user.
SikuliSharp: looked most promising, couldn't get it to work with the same images that worked for Sikuli4Net (see ...
Actually it is possible to use Sikuli for mobile too. With Appium.
Here is example of how to do it.
in this project is described the process how to setup and how to use this framework. Examples are attached.
Sikuli can extract text with OCR (optical character recognition) as described on this page: http://doc.sikuli.org/region.html#Region.text
Extracting Text from a Region class Region text() Extract the text
contained in the region using OCR.
Returns: the text as a string. Multiple lines of text are separated by
intervening ‘n’. Note: Since this ...
Here some points about sikuli I have discovered:
Sikuli can not select by 100% text match. So it is extremely difficult to use it in financial applications cause there are not too many different GUI elements, but lots of similar buttons, lists, tables... So how could you select specific string (by its contents) in table with 1000+ rows (only 25 are in a ...
AutoIT, Sikuli or Kantu Automation all work fine in a virtual machine (e. g. Virtual Box). If you have a problem there, please provide details.
On the other hand, these tools need a desktop - so they can not run headless. This is by design. They can not be compared with tools like PhantomJS that just emulate a web browser.
If you get match failures your environment is OK. Usually these errors are due to differences between your pattern and the screen image, possibly due to resolution changes or some such.
You can try another function which gives a smoother script flow.
You can let your script show where it matches to see if you are where you think you are.
moveTo() method accepts location object as parameter.
This is a common mistake which happens while using Sikuli.
Try correcting your code to :
region_1 = Region(110,320,99,23)
location_1 = Location(x,y)
Refer to below url for more information on Sikuli Region:
Hope this helps.
I also faced the same problems using AutoIT and Sikuli both are not give stable solutions for me for my works.
Now i'm using Robot class with selenium for upload file
Click File Upload Button
Copy file path of uploading file
StringSelection ss = new StringSelection("E:\\Capture.PNG");
I think the regular Sikuli works fine under Linux aswell, certainly SikuliX does:
SikuliX can be used on systems with
Windows XP, 7, 8 and 10 (development on Windows 10)
Mac OSX 10.10 and later (development on macOS 10.15)
Linux/Unix systems depending on the availability of the prerequisites
Your code example misses indentation after the class line.
I think Sikuli uses Jython, which must use spaces:
4 spaces for indentation, no tabs.
So your error is probably caused by the lack of indentation, or mixing tabs and spaces.
Your code should look like this in the IDE, but the empty line also ...
Use this link to know how to get proper reference image: Sikuli verification/assertion text image
After that you could use the below code to get the text from the region:
//find the image in the screen
Match c = screen.find(path);
//create a region with that image, means consider only that specific region where
//the reference image is present
The below code works:
//open the url
Screen screen = new Screen();
//##################### ONE TIME STEP STARTS ###############################
//A overlay screen will apear that asks you to take the screen shot
// select the area you want to capture
ScreenImage scrImgFile = screen....
Try to get the screenshot from Selenium so its identical as much as possible.
Also change your code to multiply by 100 not to add it if you want proper percentage ;)
E.g.: System.out.println("Match found with "+(m.getScore() * 100) +"%");
When the computer locks, the main screen is showing the login buttons, the Sikuli tests cannot see the application anymore. You need to disable the locking.
Since you have to lock the physical machine I think your only option is to install a virtual machine on a physical machine. That way you can have the physical machine locked and the virtual-machine ...
Is this for web testing? If so, you can use Kantu. Essentially it is the same as Sikuli, but runs inside the web browser. So you can run many instances at once and in the background. Also, the system can be locked while the test are running.
I don't no much about Sikuli, but from the programming perspective i can give you an answer.
At the AssemblyCleanup level write a method to move/copy the existing SikuliOutputLog.txt to your custom location.
string source = "C:\\A\\SikuliOutputLog.txt";
The problem in SikuliSharp is the 'culture sensitivity' in string.Format(), which caused a float to be passed as 0,7 instead of 0.7.
For details: https://github.com/christianrondeau/SikuliSharp/issues/8
It's not the prettiest, but you can store images of what you expect. Then use the selenium screenshot utility to capture a new image and then compare the two images for an exact match. The difficulty there is you need to store the images exactly how selenium takes them as there are limited options with the screenshots. It won't scale as well as Sikuli ...
This going to be a bit cumbersome.
The screenshot shows the list, just opened, with the scroll position indicator touching the top arrow up. There are 8 elements visible.
Until list scroll position indicator touches bottom arrow down:
- Click list arrow down
- Add one to list_scroll_count
Scroll back up
Select random_number between 0 ...