sikuli

How to write java program in Sikuli?

ⅰ亾dé卋堺 提交于 2019-12-06 15:29:45
I have recorded the GUI desktop application using SIKULI as below: App.open ("C:\\Program Files\\acd\\bin\\VPNClient.exe") sleep(1) type ("mganda1") sleep(1) click( ) //click OK I want to convert this script into Java. So I am trying as below: package com.arcot.test.vpn; import org.sikuli.script.*; public class AuthLogin { public static void main(String[] args) { Screen s = new Screen(); App myApp = new App("application-identifier") ; myApp.open ("C:\\Program Files\\acd\\bin\\VPNClient.exe"); //How to simulate the type, sleep and click functions here? I am searching for java examples to

Compare images using sikuli in java

大城市里の小女人 提交于 2019-12-06 15:11:13
问题 im using sikuli-api 1.0.1 in java. The current problem is that I want to use the matching algo for a given image instead of a screen. The code which works is: ScreenRegion s = new DesktopScreenRegion(); Target imageTarget = new ImageTarget(new File("someImage")); ScreenRegion r = s.find(imageTarget); Instead of using the ScreenRegion I would like to use a given image (File/BufferedImage). Any ideas how to do it? I dont want to click on the image etc. I just want to use sikulis algo to check

Ant and Junit: no xml report being generated

99封情书 提交于 2019-12-06 13:16:28
I'm very new to ant and junit. I need junit to create an xml output so I can integrate with team city. The tests run just fine, but I'm not getting any output in the directory that I'm specifying. I'm running on windows 7. I have junit.jar and ant-junit.jar in my ant_home/lib directory. here is my build xml target: <target name="onlyjunit-sikuli" description="Execute All sikuli tests"> <delete dir="${automated}/results/sikuli"/> <mkdir dir="${automated}/results"/> <mkdir dir="${automated}/results/sikuli"/> <junit printsummary="yes" showoutput="yes" fork="true" forkmode="once"> <jvmarg value="

How to call a function from another class in python?

蹲街弑〆低调 提交于 2019-12-06 12:14:59
I'm very new to python and Sikuli software. :( I was trying to call a function from another class. Here is a class which contains the functions. class Reader(): def getUsername(): .... return username def getAddress(): ..... return address Here is another class which calls the functions stated above. class DisplayInfo(): reader = Reader() uName = reader.getUsername() addr = reader.getAddress() ...... ...... But when I ran DisplayInfo class, I got this error. uName = reader.getUsername() TypeError: getUsername() takes no arguments (1 given) Could anyone help me solve this? Thanks so much in

Automatic screenshot capture of the running android application for app store commitment

落花浮王杯 提交于 2019-12-06 09:06:41
问题 I've batchly generated a lot of apk install package, and I need to commit them to the android app store. Since the app store requires me to provide 3~4 pictures of the screenshot for the running application, and I don't wanna do this manually. So I'm trying to use some automation script. After some research I get the MIT sikuli UI interactive programming IDE which supports JPython. The problem I got is that I need to uninstall my previously installed app or the installation process would fail

Integrate Selenium Grid and Sikuli API

纵饮孤独 提交于 2019-12-06 03:29:42
Currently, I am working on the automation testing framework, which combines with both Selenium Grid and Sikuli API. I already implemented a library which includes functionality of Selenium and Sikuli, and it works well when I set up my hub and node on the same machine. However, this is just the same as running Selenium RC on the machine. So, in order to achieve parallel testing, my next step is to launch the nodes from other machines and register them to the hub machine. The idea environment is Amazon EC2 instance. Hub: Linux box Nodes: win server 2008 It works fine if I just ran the tests

Drag and drop with Sikuli

北战南征 提交于 2019-12-06 03:20:13
问题 I am having trouble using drag and drop with Sikuli. I would like to drag something in any other direction (up, down, left, right) for a fixed number of pixels. This looks like it should work: t = find("1325249963143.png") dragDrop(t, [t.x + 100, t.y + 100]) Sikuli IDE log says [log] DRAG (741,525) to null but the element is not dragged. This works just fine: dragDrop("1325249963143.png", "1325251471990.png") The log says [log] DRAG (741,525) to (507,490) What am I doing wrong? Environment:

How to import the sikuli module in python?

♀尐吖头ヾ 提交于 2019-12-05 19:16:10
I'm having trouble getting sikuli+python unit testing to work, and would be glad for some assistance. I searched the internet far and wide, but haven't anything that worked. My python knowledge is very limited, and I guess that doesn't help... I'm using win7 32, sikuli 1.0 rc3 (r905), python 2.7.3 I'm trying to start running sikuli unit tests through python (not with command line, just as a python script to run with the python gui). I've followed, among others, the instructions shown here: http://sikuli.org/docx/globals.html and here: https://answers.launchpad.net/sikuli/+faq/1804 my sikuli

jnius 1.1 import error

送分小仙女□ 提交于 2019-12-05 06:00:26
问题 When I want to import jnius there is an error like: Traceback (most recent call last): ... File "C:\Python27\lib\site-packages\jnius\__init__.py", line 12, in <module> from .jnius import * ImportError: DLL load failed: The specified module could not be found. I need jnius in order to use: https://github.com/kevlened/sikuli_cpython What I have and use: Windows 7 Enterprise x64 Python 2.7.6 x86 Cython-0.19.2 jnius-1.1-dev JDK 7 Update 45 x86 回答1: Add the following to your Path environment

Automatic screenshot capture of the running android application for app store commitment

流过昼夜 提交于 2019-12-04 14:55:40
I've batchly generated a lot of apk install package, and I need to commit them to the android app store. Since the app store requires me to provide 3~4 pictures of the screenshot for the running application, and I don't wanna do this manually. So I'm trying to use some automation script. After some research I get the MIT sikuli UI interactive programming IDE which supports JPython. The problem I got is that I need to uninstall my previously installed app or the installation process would fail with the "INSTALL_FAILED_INSUFFICIENT_STORAGE" error. I think the best way would be to run the