Automation tool similar to Sikuli - automation

I really like the feature in Sikuli that allows you to select a screenshot to click and specify where within that screenshot to click. For example when there are multiple buttons that look the same, just taking a screenshot of the button itself won't cut it because Sikuli can't differentiate.
Some other automation tools don't allow you to select where you want the mouse to click within a screenshot, or it is difficult to specify where you want the mouse to click.
So my question is, is there another software tool that has this feature that Sikuli has? The reason I'm looking for something else is because I don't want to rely on image recognition completely. I was hoping to use pywinauto with Sikuli to do some of the automation, but that isn't possible.

There is at least one: eggPlant by TestPlant.
It is an automation tool using image recognition, and
You can search part of the screen by setting the SearchRectangle global property.
References:
http://www.testplant.com
http://docs.testplant.com/ePF/using/epf-finding-images.htm#Working
For Python integration Automa would be nice, and it does have nifty image recognition functions where you can have multiple image parts working together.
Not exactly what you are asking but it just might be of use.
References:
http://www.getautoma.com
http://www.getautoma.com/features/image_recognition
The odds are a bit longer but possibly AutoIt can help you as well. It interfaces with the standard Windows GUI objects and has the benefits of being both very stable and quite easy to use. It has a small tool you can use to show the properties of the screen object you want to access. No learning curve to speak of, however no image recognition or real integration to Python either.
Reference:
https://www.autoitscript.com/site/autoit/

We are using now gehrmann/PyGUIBot (python and free): https://pyguibot.wordpress.com/
Has a command line interface and GUI, records screencasts, with simple graphical programming language. Good for GUI-unittests or user interaction scripting.
Never used it on Windows, only on Ubuntu or Debian, but it looks like a cross-platform tool.

Related

Image comparison and visual testing for Windows desktop application and C# with the usage of WinAPppDriver

Please help in choosing a tool for testing watermark/image overlay. The transparency can be 0%, it should not be a problem.
The application under test is a WPF desktop application on Windows, the autotests are written in Winappdriver + C#, now it looks like I have to take a screenshot of a specific element and compare the actual image with the ideal sample by a mask.
The product under test is a video camera with the ability to insert a logotype/watermark and/or additional details (date/name/address) on the image and video. The task is to verify automatically the correctness of the inserted logo and the correctness of the inserted details in the image/video (size, color, if the logo was mirrored after insert or whatever if a name was entered badly...).
At the moment I am thinking about using OpenCV or Sikuli. I know that Appium had something similar but it probably won't work with my driver.
It is also unclear how and what can be tested with video. Just to take one frame randomly and make a test for it as for an image?
Many thanks for your help and suggestions!
Perhaps not a complete answer to you your questions but a few words on how Sikuli works and what might be a disadvantage, if I understand your needs correctly. First of all, Sikuli is using OpenCV internally by calling the Imgproc.matchTemplate() function. There is not much control over it from Sikuli but you can set a minimum similarity score that varies between 0 (everything will match) and 1 (pixel perfect comparison). Given you intend to use it for video originated patterns, you'd want to be somewhere in the middle. Having said that, I am not sure what quality of comparison you'd like to obtain so not sure if the minimum similarity by itself will be enough.
Another thought is to integrate the OpenCv lib itself in your code and use it directly. This is not an easy task and some basic understand of image processing techniques might be required.

Automation scripts: autoitscript vs ptfbpro

I try to use this 2 projects for primitive gui testing automation:
http://www.ptfbpro.com/
http://www.autoitscript.com/
And I can't make my choice.
Can somebody explain me: why(in 2 or 3 lines) he use one of them(or other please specify)?
I use AutoIt...
because it's free, well documented (not only) from inside of the Scite Editor and you can easily compile your script into a small executable or even create a complete GUI and there is a very good community in the forums and around here. And its Basic-Like Syntax is really easy to understand, there are functions and even a foreach-syntax, dynamic arrays and lots of additional functions from other users... There's good integration with other programming languages and from the use of so many WinAPI functions you lack of very little possibilities. It can automate IE usage without even displaying a browser window and send network packages, you can send Keystrokes like a user sitting in front of your screen and there's the AU3Record Tool which allows you to just record a Macro and replay it or save it as a script and then you can easily optimize it and edit it for your needs. Or use the AutoIt Window Info tool to see all the possible handlings for your application, you can interact with any kind of program output/display according to different algorithms you may invent.
Enough facts? ;-)
Go with Autoit3. It 's a lot more reliable, and you have a complete script language. Ptfbpro is only a tool (not free), nothing more. AUtoit3 has a lot of contributors that can help you in your process, Ptfbpro is dead.
If you want a script taht really do what you want, just go for AutoIt. Ptfbpro can't be used as a professional tool.
Autoit3 as well. You really can't beat it for being free and so easy to use.

How do I make s SIMPLE terminal game with real-time input on Linux?

I am looking a bit of simple code that will take whatever data comes from the keyboard at a given moment and let me check it for certain button presses. It doesn't matter what language it is in.
I am looking for a console solution, no GUI.
It sounds like you are looking for the curses library (you may also find an implementation as "ncurses", which is probably already installed on your system). This library powers most of the "full-screen" console programs that you might see on Linux.

3d files in vb.net

I know this will be a difficult question, so I am not necessarily looking for a direct answer but maybe a tutorial or a point in the right direction.
What I am doing is programing a robot that will be controlled by a remote operator. We have a 3D rendering of the robot in SolidWorks. What I am looking to do is get the 3D file into VB (probably using DX9) and be able to manipulate it using code so that the remote operator will have a better idea of what the robot is doing. The operator will also have live video to look at, but that doesn't really matter for this question.
Any help would be greatly appreciated. Thanks!
Sounds like a tough idea to implement. Well, for VB you are stuck with MDX 1.1(Comes with DirectX SDK) or SlimDX (or other 3rd party Managed DirectX wrapper). The latest XNA (replacement for MDX 1.1/2.0b) is only available for C# coder. You can try some workaround but it's not recommended and you won't get much community support. These are the least you need to get your VB to display some 3d stuffs.
If you want to save some trouble, you could use ready made game engine to simplified you job. Try Ogre, and it's managed wrapper MOgre. It was one of the candidate for my project. But I ended up with SlimDX due to Ogre not supporting video very well. But since video is not your requirement, you can really consider it. Most sample would be in C# also, so you need to convert to VB.Net to use. It won't be hard.
Here comes the harder part, you need to export your model exported from SolidWorks to DirectX Format (*.x). I did a quick search in google and only found a few paid tools to do that. You might need to spend a bit on that or spend more time looking for free converter tools.
That's about it. If you have more question, post again. Good Luck
I'm not sure what the real question is but what I suspect that you are trying to do is to be able to manipulate a SW model of a robot with some sort of a manual input. Assuming that this is the correct question, there are two aspects that need to be dwelt with:
1) The Solidworks module: Once the model of the robot is working properly in SW, a program can be written in VB.Net that can manipulate the positional mates for each of the joints. Also using VB, a window can be programmed with slide bars etc. that will allow the operator to be able to "remotely" control the robot. Once this is done, there is a great opportunity to setup a table that could store the sequencial steps. When completed, the VB program could be further developed to allow the robot to "cycle" through a sequence of moves. If any obstacles are also added to the model, this would be a great tool for collission detection and training off line.
2) If the question also includes the incorporation of a physical operator pendent there are a number of potential solutions for this. It would be hoped that the robot software would provide a VB library for communicating and commanding the Robot programatically. If this is the case, then the VB code could then be developed with a "run" mode where the SW robot is controlled by the operator pendent, instead of the controls in the VB window, (as mentioned above). This would then allow the opertor to work "offline" with a virtual robot.
Hope this helps.

Tools for automating mouse and keyboard events sent to a windows application

What tools are useful for automating clicking through a windows form application? Is this even useful? I see the testers at my company doing this a great deal and it seems like a waste of time.
Check out https://github.com/TestStack/White and http://nunitforms.sourceforge.net/. We've used the White project with success.
Though they're mostly targeted at automating administration tasks or shortcuts for users, Autohotkey and AutoIT let you automate nearly anything you want as far as mouse/keyboard interaction.
Some of the mouse stuff can get tricky when the only way to really tell it what you want to click is an X,Y coordinate, but for automating entirely arbitrary tasks on a Windows machine, it does the trick.
Like I said, they're not necessarily intended for testing purposes, so they're not instrumented for unit test conventions. However, I use them all of the time to automate stuff that isn't testing related.
You can do it programmatically via the Microsoft UI Automation API. There's an MSDN Magazine article about it.
Integrates well with unit test frameworks. A better option than the coordinate-based script runners because you don't have to rewrite scripts when layouts change.
There's a couple out there. They all hook into the windows API to log item clicks, and then reproduce them to test.
We're now mostly web based (using WatiN), but we used to use Mercury Quicktest.
Don't use Quicktest, it's awful for a tremendously long list of reasons.
This is what i was looking for.
Check out http://www.codeplex.com/white and http://nunitforms.sourceforge.net/. We've used the White project with success.