Testmate uses Tesseract to provide OCR support. Tesseract is an optical character recognition engine for various operating systems. It support a lot of languages, complete list can be found here. To use Tesseract, all you need to do is download tessdata library. Use the below code to OCR the image: 1 2 3 4
Testmate can automate anything you see on the desktop screen. It can identifies the images and perform actions on them. It is useful when the objects are not identifiable using standard methods. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 'Highlight the image on the desktop Call img.HighlightImage("C:\Users\...\Desktop\Capture.png")
Testmate allows you to simulate keystrokes and mouse clicks as below. Mouse Click 1 2 'Perform mouse click on the entered x and y co ordinates Call native.MouseClick(5,5)'Perform mouse click on the entered x and y co ordinates Call native.MouseClick(5,5) Mouse Right Click 1 2 'Perform right mouse click on the entered x and y
Testmate provides you the capability to invoke procedures in external DLL’s. The below code demonstrates the usage of LoadAndRun method to invoke SetForegroundWindow method from user32.dl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 'Declare The DLL to be used sDLL = "user32.dll" 'Declare the reulrn
To launch Internet explorer with a proxy use following code within Testmate.
The below code launch the Firefox browser using Testmate , navigates the URL and perform some search operations. Webdriver needs gecko driver to launch firefox. Setup: Make sure Geckodriver.exe file path is present in Path system variable Firefox Default Firefox Binary Firefox Profile Firefox Proxy
The below piece of code demonstrates the usage of advance methods for UI Automation. It invokes the sample application (which is provided with the tool. This code also uses object repository, which is attached in the post. Setup: Copy the below vbscript code in a text file with extension .jts In the same folder as
Below is the sample script for for automating calculator application on windows 10. The script launches the calculator and clicks on 2,3 and 4 number buttons 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 'Describe the object properties oWindow = "Window,Name::Calculator" oTwo = "Window,Name::Calculator>==>Button,Name::Two" oThree