sikuli

Can Sikuli be used for web testing?

安稳与你 提交于 2019-12-11 03:47:21
问题 I was working with Sikuli for desktop application like notepad, but want to know like can I open new tab in browser using Sikuli? 回答1: Yes, using Sikuli you can also automate browser. Take images of required web elements (Open new tab button in your case) and stimulate click action using Sikuli APIs. 回答2: Yes, you can use Sikuli for web testing. In this code example, you can use sikuli app to: open browser --> New tab --> Give a like on a webpage (UTAD in this case): click("mozilla_icon.png")

Intermittent failure of Sikuli

戏子无情 提交于 2019-12-11 01:42:04
问题 I have integrated Sikuli with my Selenium project. For the sake of learning, I have used simple gmail login application to automate it using Sikuli. Well, I am able to execute script. Now let's say, I'm typing something in my Username field. And sometimes, the mouse is not hovered to the username field. So my test scripts failed. And it is intermittent behavior. public static void main(String[] args) throws Exception { Screen screen = new Screen(); Pattern pattern1 = new Pattern("E:\\Projects

AWT Robot not able to drag a window

泄露秘密 提交于 2019-12-11 01:22:45
问题 I'm trying to move a Windows Explorer window using the AWT Robot. The robot is running in Java 7, and the OS is Windows 7. I'm able to move the mouse and click on things, but when I try to click-and-drag, it doesn't seem to be pressing the button at all. I can't see what's wrong, or think of how to figure out what's happening. I started out using Sikuli: mouse.mouseDown(InputEvent.BUTTON1_MASK); mouse.drop(targetLocation); When that didn't work, I tried a lower-level implementation, working

Using Sikuli to verify text

∥☆過路亽.° 提交于 2019-12-10 20:51:52
问题 I am using the Sikuli IDE to test an application that returns data in a text box. For example I search the name field for my test value 'FirstName01' the application returns the name and address in various text boxes. I then verify the data by using the exists() function in Sikuli. To do this I click on the exists function in the upper left of the IDE and use the + tool to select the text I want to verify. In this case FirstName01 and Location01. I then set the Similarity setting on the

Ant and Junit: no xml report being generated

青春壹個敷衍的年華 提交于 2019-12-10 11:04:56
问题 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}

How to press [WINDOW] + [UpArrow] keys together, using Sikuli or Selenium

六眼飞鱼酱① 提交于 2019-12-08 12:52:30
I need to press WINDOW + UpArrow . At first attempt I have tried with sikuli by :- s1.type(Key.WIN + Key.UP); But it only press WINDOW and UpArrow buttons, but separately . By selenium I have try with Actions class but I have found there is no key available to press WINDOW button there. In sikuli, if you want to simulate pressing and holding one button, while then typing another, use type(TheKeyDoingTheAction, KeyModifier.TheKeyYoureHoldingDown It's written like this: type(Key.UP, KeyModifier.WIN) #This is the one from your question Here are a few other common examples: type("c", KeyModifier

How to handle try catch exception in ride robot framework?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 06:38:31
问题 I'm using RIDE robotframework, i want to handle an exception when the application is crashed i close it then open a new instance of it. *** Settings *** Library SikuliLibrary *** Variables *** ${openProject} sikuli_captured\\Emna\\openProject.png ${DataBaseSTProject} sikuli_captured\\Emna\\DataBaseSTProject.png ${testSession} sikuli_captured\\Emna\\testSession.png ${menu} sikuli_captured\\menu.png ${fileName} sikuli_captured\\Emna\\fileName.png ${save} sikuli_captured\\Emna\\save.png *** Test

How to press [WINDOW] + [UpArrow] keys together, using Sikuli or Selenium

我是研究僧i 提交于 2019-12-08 04:05:20
问题 I need to press WINDOW + UpArrow . At first attempt I have tried with sikuli by :- s1.type(Key.WIN + Key.UP); But it only press WINDOW and UpArrow buttons, but separately . By selenium I have try with Actions class but I have found there is no key available to press WINDOW button there. 回答1: In sikuli, if you want to simulate pressing and holding one button, while then typing another, use type(TheKeyDoingTheAction, KeyModifier.TheKeyYoureHoldingDown It's written like this: type(Key.UP,

How to call a function from another class in python?

南楼画角 提交于 2019-12-08 01:41:22
问题 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()

In Sikuli, How to find and click a minimum of 3 identical images?

半腔热情 提交于 2019-12-06 15:51:45
I'm trying to click no less than 3 of the same image, but with findAll() I am having difficulty with sikuli wanting to select only 1 image when I don't want it to select any if there is not 3 or more. if exists(Pattern("1474201252795.png").similar(0.95)): wait(1) for x in findAll(Pattern("1474201252795.png").similar(0.95)): click(x) So just count the images first and check if the count is higher than 3. imageCount=0 images = [] # find all images and store them in a list to prevent additional search for image in findAll("Win7StartBtn.png"): images.append(image) #check list length and act