- Right click on the Test Case Project in the Solution Explorer
- Select the TestResults.io context menu
- Select the Change Engine version option
- Select the desired engine version and press OK
- Right click on the Solution in the Solution Explorer
- Select the TestResults.io context menu
- Select the Publish all test containers option
- Make sure to only record the static part of an element. For example only the label of a textbox and not the box itself, because the content of the box itself can change.
- Also test what happens if you change the size of your application window, for example a button could get smaller and smaller, so only capture the static text inside the button and not the border.
- If there are multiple variants of an element make sure to record an image for all variants (like a button gets bigger on mouseover, or a link is blue first and purple if you already clicked it)
- If your system under test already includes the required files, you can just access it like a user would by e.g. using the Windows File Explorer or File Dialog which are already automated by us in the Windows Environment Model.
- If your system under test does not include the required file, or you require more flexibility read our guide on how to use supporting files during a test exection.
- To share your test automation progress we recommend using the Visual Studio Version Control which supports the git provider of your choice, such as GitHub, Azure DevOps, Bitbucket etc.
- If an execution just stops it usually means an expected element or a screen was not found in which case the test engine aborts. Our debug log will tell you precisely at which point during the execution which element was not found.
- If you executed the test case in the portal platform use the Detailed Report Tab to see where the execution stopped and download the linked Debug Log.
- To access the Debug Log in a Visual Studio test run, make sure to open the Output window (in View --> Output) and switch the "Show output from" dropdown to "TestResults.io Public" or "TestResults.io Debug" for even more details.
- Use the following FAQ chapters to help you how to fix if an element was not found or found in the wrong location.
- First make sure the element is visible on the test environment and for example your navigation to the screen was correctly executed.
- Compare your captured image with what is actually displayed on the test environment. Depending on your applications elements may look different if they were already clicked once, or on mouseover, or if the focus is somewhere else.
- In case you require multiple different images of an element you can capture these by editing your Screen (double click in the Screen Explorer on it), editing the Element and click the camera icon again. In the displayed folder structure you can right click on the folder or image to add, modify and delete images.
- Our image search engine allows some deviation while comparing your captured image to the test environment. Usually this is very helpful as the visual rendering on the test environment is not always the same if you compare each pixel by pixel.
- In case some elements look very similar (e.g. some icons look almost the same) this allowed deviation can lead to mismatches.
- But you can edit the affected Image by using the Image Explorer to adjust the precision of the image search. In most cases of a mismatch we recommend switching the Engine from "Default" to "Precise", and below in "Precison" enter a value of "0.9". A value of 1.0 would require a pixel perfect match, 0.9 still allows a slight deviation.
- First make sure you use the correct element type. For example if you have multiple Yes / No questions use the "LabelWithButton" instead of "Button" Element. With this element type you can record the question as the Label, the answers as the Buttons and define the relative position of the buttons to the label including a grid width and height if required. The same options exist for Checkbox and LabelWithCheckbox
- If this does not work in your scenario you can limit the screenspace where the element is searched on. For this create a Select and apply it to the Element with the SetSelectFilter method. You can apply a Select filter on a single Element or on the containing Screen itself.
Example for setting a Select depending on another ReferenceElement
Select buttonSelect = Select.FromXY(
ReferenceElement.Position.Boundary.Top - 30,
Example for using a Select with a ColorFill on an Image:
Select rightSideSelect = t.SelectFromColorAtPoint(Images.Common.RightSideOrigin);
- In our documentation you can find all the settings (called Properties) we support for the different kind of elements (for example Textbox Properties)
- To change these Properties right click the Screen in the Screen Explorer and select "Open Screen Class". If it does not exist yet add the Method "ConfigureElementProperties" as displayed below inside the class of your screen.
public partial class HomeScreen
partial void ConfigureElementProperties()
SearchTextbox.TextBoxType = TextBoxType.OCR;
- In this example we change the TextBoxType of the Textbox called "SearchTextbox" on the Screen "HomeScreen". With this change the clipboard is no longer used to verify the content of the textbox, but instead it is read using OCR.
- Some settings use the keyword "static", these are applied to all elements of e.g. Type Textbox. We recommend to configure these inside the constructor of your App Class (you can find it inside your Model Project in the File App.cs, the constructor is the Method with the same name as your class)
TextBox.DefaultType = TextBoxType.OCR;
- We try to give you the best out of the box OCR experience possible, but depending on the used font, text size, text and background color furter configuration may be required. We support multiple OCR engines and give access to a lot of configuration possiblities
- Overwhelmed with all the possibilities? Check out our collection of best practise OCR configurations.