Note: To use QAS existing projects, first import the projects into QAS and then use them.
Access QAS Recorder Commands
QMetry Automation Studio provides you with the ability to automatically provide Assertion values while Recording Test Cases through Web Browser.
1. Open your recorder screen in the browser and right-click on the screen.
2. Locate the QAS Recorder main option with the list of QAS commands underneath. You can use the commands as per requirement. These commands are self-explanatory. Some of them are described below.
Mouse Over: This command performs the mouse hover action on the given UI element.
Verify Present: This command checks whether the given UI element is present on the page.
Assert Present: This command checks whether the given UI element is present on the page.
Verify Text: This command checks if some text exists or not in a page.
Verify Not Text: This command checks that the given text is not available on the UI element.
Alert Handling Methods
Alerts are modal windows that pop up on the UI with a dialog and relevant message on them. The focus shifts from the current screen to the pop-up, which compels the user to first act on it before performing any other actions or accessing other parts on the web page. Users need to accept/reject/confirm the pop-up to proceed further on the web page.
QAS handles such alerts through the following methods. You need to enter the alert commands manually in the test case to handle the alerts and accept/reject/confirm the pop-ups.
Accept Alert: This method is used to confirm an action performed by the users. When users need to click on the OK button of an alert pop-up.
Dismiss Alert: This method is used to ask the user to cancel something. When users need to click on the Cancel button of an alert pop-up.
Get Alert Text: This method is used to get displayed the text of an alert pop-up.
Set Alert Text: This method is used to type text into an alert pop-up e.g. “regression”.
Verify Alert Not Present: This method is used to verify if the alert is not present in the defined time in milliseconds.
Verify Alert Present: This method is used to verify if the alert is present in the defined time in milliseconds.
Wait for Alert: This method is used to wait for an alert to present in the defined time in milliseconds.
Get Alert Text
The 'Get Alert Text' command value text can be stored in a variable and that variable can be reused for verification and assertion from the recorder and CI/CD.
QAS provides an option to store the alert text in a variable, which can then be reused further in the execution of subsequent steps/test cases to verify the existence of the alert text. Users can replace the stored parameter value in their execution from UI which will be then referred to in the subsequent calls. The feature helps users store the alert text value and use the same to verify the alert in the further execution from Test Recorder. The variable will replace the exact value that has been stored.
For example, the value of Get Alert Text can be stored and used at run time to verify the existence of the alert while execution.
1. Record a test case.
2. On the page, click on the button to see and store the alert.
3. Then right-click on the page, point to QAS Recorder and select the Get Alert Text option.
4. Perform the next test steps.
5. Now stop the recording and go to the recorded test case. In the recorded test case, replace the text with the saved variable name in the syntax:
6. Once you are done with replacing the text with the variable name, execute the test case.
Note: In the case of test suite level execution, the feature works only with Multiple session Execution Mode wherein the test cases will execute sequentially.
Replace a Stored Value
QAS provides options to store a value, text or title in a variable for all platforms testing so that the user can use it further in the execution of subsequent steps. Users can replace the stored parameter value in their execution from UI which will be then referred to in the subsequent calls. The feature helps users store any value and use the same in further execution from Test Recorder.
These options are available while recording a test case: Store Text, Store Title, Store Value. The variable will replace the exact value that has been stored.
For example, the value of credentials can be stored and used at run time to avoid session time-out errors while execution.
Here, is an example of the Web platform.
1. Record a test case.
2. On the page, select the text that you want to store and right-click on it. Point to QAS Recorder and select the Store Value option.
The QAS Recorder pop-up opens.
3. Give a variable name to store the selected text on the page.
4. In the recorded test case, replace the text with the saved variable name in the syntax:
5. Once you are done with replacing the text with the variable name, execute the test case.
On the execution result screen, you can see the test is executed with the saved variable.
Here, is an example of the Android platform.
1. Record a test case.
Click on the element.
The relevant locator is displayed in the drop-down above.
Select the Store Value or Store Text Event for the locator from the drop-down and click on the Apply button.
2. Give a variable name to store the selected text on the page.
The event is recorded in the App Source.
3. In the recorded test case, replace the text with the saved variable name in the syntax:
4. Once you are done with replacing the text with the variable name, execute the test case.
View Test Case Variables
Test Case Variables display only assertions defined in the test cases across all the test suites. The variable list is displayed at the test suite level for all the test cases under all the test suites. It helps users track the variables used in the test cases.
1. On the Test Suite level, click on the more option and select Test Case Variables.
It opens the Test Case Variables screen with the list of variables that have been used in the test cases. If the list is long, you can also search for a particular text from the columns using the search box.
2. The Variable Names are clickable. To view the details of a particular variable, click that variable.
It navigates you to the test case command where the variable is used.
QAS supports the Java Script and Async Java Script Execution commands. Users can use their custom control commands written in Java Script to execute on the current browser window. For example, if you have some Java Script commands written by you. You can put your Java Script in the test case and it will be executed on the browser.
A separate Java Script editor is provided for the ease of writing the script. It also validates the script before saving it, which saves test case failure incidences.
Execute Async Java Script: This command waits for the Java Scripts to get executed for a duration of time (milliseconds) provided by users.