Desktop Action Documentation
Desktop actions are exposed in the Desktop Automation framework in Quality Modeller. The corresponding Git repository is available https://github.com/CuriositySoftwareIreland/TestModeller-FlaUI. This uses FlaUI with C# as the underlying automation technology.
When the framework is imported into Quality Modeller, the actions below are available in the 'DesktopGeneralActions' module. This provides an accelerator for automating common actions on Desktop applications. This class can be extended to incorporate your own keywords and actions as necessary.
QuickStart Desktop Test Automation
To learn how you can quickly get started with Desktop Automation in Quality Modeller: QuickStart Desktop Automation
Location Strategy
All keywords in the Quality Modeller DesktopGeneralActions library that need to find an element on the page take a locator argument. Locator is a string that specifies the element identifier to use for finding the element. We recommend you use FlaUIInspect to find the associated ID for an element, https://github.com/FlaUI/FlaUInspect.
Strategy | Example |
---|---|
XPath | xpath://input[id="username"] |
Id | id:usernameId |
Class | class:username |
Text | text:#usernameId |
Value | value:user |
Help Text | helpText:usernameObj |
Automation ID (Default) | usernameObjID |
Library Usage
In order to use the library actions, you need to firstly open an application on the Windows desktop. To do this, you can use the command 'Open Application' with the parameter of the location of the application. e.g.
OpenApplication("c:\calc.exe")
Desktop Actions
Open Store Application (String appName)Arguments appName - Application name from store Documentation Launches an application from the Store. |
---|
Open Application (String appName)Arguments appName - Relative or absolute path to executable to launch Documentation Launches an application. |
---|
Use Main WindowDocumentation |
---|
Enter Text (String objectName, String text)Arguments objectName - Object identifier Documentation |
---|
AssertLabelText(String objectName, String text)Arguments objectName - Object identifier text - Text to assert label Documentation |
---|
Close ApplicationDocumentation |
---|
Click (String objectName)Arguments objectName - Object identifier Documentation |
---|
Right Click (String objectName)Arguments objectName - Object identifier Documentation |
---|
Double Click (String objectName)Arguments objectName - Object identifier Documentation |
---|
Select Combobox Item By Index (String objectName, int index)Arguments objectName - Object identifier index - Index of the combobox item to select Documentation |
---|
Select Listbox Item By Index (String objectName, int index)Arguments objectName - Object identifier index - Index of the list box item to select Documentation |
---|
Select Radiobutton (String objectName)Arguments objectName - Object identifier Documentation |
---|
Close WindowDocumentation Close the current window open |
---|
Collapse All Treeitems (String objectName)Arguments objectName - Object identifier Documentation |
---|
Collapse Combobox (String objectName)Arguments objectName - Object identifier Documentation |
---|
Combobox Should Contain (String objectName, String itemName)Arguments objectName - Object identifier itemName - Name the combobox should contain Documentation |
---|
Drag And Drop (String fromObject, String endObject)Arguments objectName - Object to drag from endObject - Object to drag onto Documentation |
---|
Element Should Be Visible (String objectName)Arguments objectName - Object identifier Documentation |
---|
Element Should Exist (String objectName)Arguments objectName - Object identifier Documentation |
---|
Element Should Not Be Visible (String objectName)Arguments objectName - Object identifier Documentation |
---|
Element Should Not Exist (String objectName)Arguments objectName - Object identifier Documentation |
---|
Expand All Treeitems (String objectName)Arguments objectName - Object identifier Documentation |
---|
Expand Combobox (String objectName)Arguments objectName - Object identifier Documentation |
---|
Expand Treeitem (String objectName)Arguments objectName - Object identifier Documentation |
---|
Focus (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Checkbox State (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Combobox Items Count (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Grid Rows Count (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Listbox Items Count (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Name From Element (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Radiobutton State (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Root Treeitems Count (String objectName)Arguments objectName - Object identifier Documentation |
---|
Get Text From Textbox (String objectName)Arguments objectName - Object identifier Documentation |
---|
Verify Element Enabled (String objectName)Arguments objectName - Object identifier Documentation |
---|
Listbox Selection Should Be (String objectName, String name)Arguments objectName - Object identifier name - Name of the selected listbox item should be Documentation |
---|
Listbox Should Contain (String objectName, String name)Arguments objectName - Object identifier name - Name the listbox should contain Documentation |
---|
Move To Position (int xPos, int yPos)Arguments xPos - Move the cursor to the x coordinate yPos - Move the cursor to the y coordinate Documentation |
---|
Move To Element (String objectName)Arguments objectName - Object identifier Documentation |
---|
Name Contains Text (String objectName, String text)Arguments objectName - Object identifier text - Text the element should contain Documentation |
---|
Name Should Be (String objectName, String name)Arguments objectName - Object identifier name - Name the element should be Documentation |
---|
Select Listbox Item By Name (String objectName, String name)Arguments objectName - Object identifier name - Name of the listbox item to select Documentation |
---|
Select Tab Item By Name (String objectName, String name)Arguments objectName - Object identifier name - Name of the tab to select Documentation Select the item in the selected tab by name |
---|
Select Treeitem (String objectName)Arguments objectName - Object identifier |
---|
Set Checkbox State (String objectName, Boolean state)Arguments objectName - Object identifier state - State of the checkbox Documentation |
---|
Wait Until Element Is Responsive (String objectName)Arguments objectName - Object identifier Documentation |
---|