7. List of Subject7 Commands

The frequently used commands are above the line. Below the line, however, all commands are alphabetically sorted. In order to look for a command, you can type what you are looking for in the command drop down, and your options will be filtered down. You can also enter certain keywords that will bring up related commands for you to view, such as fill, set, etc.

Figure (1): Frequently Used Commands      Figure (2): Line

* "Halt on Failure" is an option that exists for all commands. By default it is checked, meaning if the command fails, the test case fails. However, you can override this behavior by using the option "Continue on Failure". Once you do that, if the command fails, it does not fail the test case and continues to the next step in the test case. This will be a fail_skip status with an orange check mark. If you want the step to be considered a pass with a green check mark, you will need to click on "Continue with Pass Status" which will show the test case step/command as a pass (i.e. green check mark) whether or not the step passes. Refer to Generic Command Options for more information and examples on how to use these options.


Subject7-supported commands are as follows:

1) ACCEPT_SSL: Deprecated.

2) ACTIVE_WEB_SECURITY_CHECK: Need a Web Security Testing license to use this command. Performs active scanning on web applications to find potential vulnerabilities by using known attacks against the selected targets. This command requires ZAP installation on your device for local runs to work.

 More...

Description: This feature is only available for customers who have a license. Performs active scanning on web applications to find potential vulnerabilities by using known attacks against the selected targets. This command requires ZAP installation on your device for local runs to work.

Usage Scenario: Suppose we want to perform an active web security check on Reference app.

Procedure: 1. Install OWASP ZAP for a local run and use this command in your step to perform the scan.

2. Follow the instructions in Dynamic Security Testing

3) ADD_APP_ERROR_PAGES: Deprecated.

4) ALERT (OK/Cancel): Okays or cancels an alert. An alert box is a popup that usually has a different look and feel than the application itself. OK or Accept button confirms the alert box, and Cancel or Decline cancels it.

 More...

Description: This command is used to accept or cancel a JavaScript popup.
Usage Scenario: Supposed we have a web page that displays a JavaScript popup with OK and Cancel buttons such as the below and we want to click OK/ Cancel on this popup.

Procedure: Define steps that lead up to the point the JavaScript popup appears and add a step with Alert command and select OK/Cancel. Your steps will look like this:

Step that presses OK:

Step that presses Cancel:

5) ASSERT (FALSE): ASSERT FALSE: Forces test case failure on this step.

 More...

Description: This command is used to force test case failure if it reaches this step.
Usage Scenario: Suppose we want to count the number of profiles in Reference app and if they are more than 50, the test case must fail.

Procedure: In a combination with Get_Web_Value that counts the profiles and an If command, you can use this command to have the test case fail in case the number or profiles is more than 50. Define a Get_Web_Value step using XPath “count(//a[contains(@href,'profile') and @class='ng-binding'])” with type Number and an If command that compares the variable to less than or equal to 50. Your steps will look like this:

6) AUTO_SCROLLING: Allows enabling/disabling auto-scrolling feature during test case execution (rather than enabling/disabling feature for the entire account)

7) CALL: Makes a function call already defined by users in the account. Asterisk (*) can be used when searching for a specific function name.

 More...

Description: This command is used to call a function. Functions allow reusing several steps grouped together, either in test cases or other functions. Once we create a function we can use this command to call it.
Usage Scenario: For example, suppose we want to reuse the login process in several test cases that need it. The login process has 4 steps:

1- Click login_link_locator_artifact
2- Fill username_textbox_locator_artifcat value
3- Fill password_textbox_locator_artifact value
4- Click login_button_locator_artifact

Procedure: Create the four steps, define locators for them and group them into a single function with title "subject7_reference_login". Then use Call command and select this function in your test case. Your steps should look like this:

Step view:

image-20240201-163551.png

Expanded function view:

image-20240201-163633.png

See the reference Test Library path: subject7_samples/subject7_basic_suite/subject7_website_login_logout

The following video demonstrates how the functions “subject7_reference_login” and “subject7_reference_logout” are called and executed as part of “subject7_website_login_logout” test case in “subject7_samples” folder:

call.mp4

Reference App

8) CHANGE_CASE: Converts what appears in the message field to either upper case or lower case (based on the Case type field) and stores the result in Variable name. This variable can be used in the remainder of the test case by using @ before the variable name (i.e. @my_var_name). In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the Message field. A list of variables will appear for you to select from.

 More...

Description: This command changes a value in the Message field to uppercase or lowercase and assigns the value in a variable.
Usage Scenario: Suppose we want to change the first and last names in our Reference app profile to uppercase letters.

Procedure: Define locators to retrieve the first and last names from our Reference app using Get_Web_Value with “Text” and define steps to change the case on them using Change_Case command. Then use Fill command where Value takes the variables from the Change_Case steps. Your steps will look like this:

image-20240201-164057.pngimage-20240201-164233.png

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_modify_profile_information

The following video demonstrates how the First Name and Last Name are retrieved using Get_Web_Value command, changed to Uppercase letters and filled again in their original text boxes. This is part of execution of “subject7_modify_profile_information” test case in “subject7_samples” folder:

Change case.mp4

Reference App

9) CHECK: Checks or unchecks a checkbox based on whether checkbox field is checked or not respectively.

 More...

Definition: This command checks or unchecks a checkbox depending on your selection.
Usage Scenario: Suppose we want to check 3 check-boxes like the ones on the page below and then uncheck them.

Procedure: Generate XPaths for the check-boxes and create web locators or use inline XPaths in steps with Check command. You will need to tick the checkbox next to "Check" in the command options to ensure that the check-box will be checked. Leaving it unchecked will uncheck the checkbox. Your steps will look like this:

Steps that will enable the check-box:

Steps that will disable the check-boxes:

10) CHECK_508: Need a 508 license to use this command. Checks whether the current page is 508 compliant or not. The rules that are automatically checked are WCAG 2.0 1.1.1-Level A, 1.3.1-Level A, 2.1.1-Level A, 2.4.1-Level A, 2.4.4 Level A, 2.4.6-Level AA, and 3.3.2-Level A. The XPath's for data tables for the page should be included specifically as part of this command otherwise they will treat them as layout tables. 508 reports, including accessibility and compliance reports, are extractable to Excel and PDF and can be filtered though using the Filter function added. Also, the 508 rules included in the CHECK-508 wizard have been added under the Rules link. This command can be used in both local/cloud runs.

 More...

Description: This command provides a 508 compliance report after checking a website that you specify in a Goto_URL step. A 508 license is required for you to be able to use this command. The command checks the following rules according to 508 web standards:

1.1.1 - Level A
Images without alt long desc
Buttons without content
Applets without alt
Objects without alt
Client side image map without alt

2.4.6 - Level AA
Headings without content

1.3.1 - Level A
Broken aria references
Internal style sheets
Layout table has headers (th tags)
Data tables doesn't have headers
Data tables have empty headers

2.4.4 - Level A
Empty links

1194.22-a
Video/audio without alt

2.1.1 - Level A
Server side map images

1194.22-e
Server side image map

3.3.2 - Level A
No label for filed id attribute

2.4.1 - Level A
Broken Skip navigation link
Frames without title

Data Table XPaths: This field is used when you have a data table where the data is related to each other, like the table below which has table header tag<th>. If this table is not specified in the command (Using an XPath such as //table), it will be considered a layout table (which is a table that can be used to position elements). So by default, all tables are inspected by the command as layout tables, except data tables specified in the field.

Usage Scenario: Suppose we want to check compliance of Reference app main page as well as the table of users page.

Procedure: Define a step that navigates to our Reference app and another step that performs the 508 compliance check. Then define steps that navigate to Profiles > User tables and define one last step that checks the profile table page. Your steps will look like this:

11) CLEAR: Clears the content of a text field identified by a web locator or inline XPath.

 More...

Description: This command clears an HTML text box identified by a web locator or inline XPath.
Usage Scenario: Suppose we want to clear the Birthday text box which is on the Edit Profile page in our Reference app.

Procedure: Define steps that lead up to “Edit Profile” page and then define a locator with reference name: "subject7_reference_edit_profile.text.birthday" where the HTML tag is

<input type="text" id="birthday" ng-model="ctrl.profile.birthday" placeholder="dd.MM.yyyy" class="form-control ng-valid ng-isolate-scope ng-valid-date ng-empty ng-dirty ng-touched" uib-datepicker-popup="dd.MM.yyyy" datepicker-options="ctrl.datePicker.options" is-open="ctrl.isOpen" enable-time="false" close-text="Close" style="">

and the XPath is:

//label[contains(@for, 'birthday')]/ancestor::div/descendant::input[@placeholder='dd.MM.yyyy']

In your step, select Clear command and select the locator or add an inline XPath. Your step will look like this:

Web Locator:

Inline XPath:

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_account_cleanup

The video following video demonstrates how the Birthday, Country, City and Resume fields contents are cleared as part of execution of “subject7_account_cleanup” test case in “subject7_samples” folder. Note that since the fields are originally empty, some data was added to simulate clearing the text boxes.

Subject7 Video 3.mp4

Reference App

12) CLICK: Clicks a button or another widget identified by a web locator or inline XPath.

 More...

Description: This command clicks on a web element or a widget defined by a locator or inline XPath.

Usage Scenario: Suppose we want to click the Login link on our Reference app

Procedure: Define a locator with reference name “subject7_reference_login.link.login where the HTML tag is:

<a href="/#/login">LOGIN</a>

and the XPath is:

//a[contains(text(),'LOGIN')]

Alternatively, you can enable Inline XPath checkbox and paste the XPath in your step. If you are planning on using this XPath in other test cases, you can create a web locator.

In your step, select Click command and select the locator. Your step will look like this:

Web Locator:

image-20240223-120226.png

Inline XPath:

image-20240223-120252.png

See the Test Library path: subject7_samples/subject7_basic_suite/subject7_website_login_logout

The video following video demonstrates how the “Login” link and button are clicked as part of execution of “subject7_website_login_logout” test case in “subject7_samples” folder:

Subject7 Video.mp4

Reference App

13) CLOSE_POPUP: Closes a popup identified by a unique text in the "Test in Popup" field that is not present on other windows opened up by the application under test. "Close all popups except main" option closes all the popups opened except the original/main window. Please note that popup is a window that you can drag and make a tab out of in your browser otherwise it is either an alert box or a div and NOT a popup. Command also allows closing the Last Tab or by using a Handler Index of 1,2,3 based on the order of pages/windows/tabs. The main page will be 0, so this command will not close the main page.

 More...

Description: This command closes a popup window (window that you can drag or make a tab out of) identified by text, handler index, last tab or closes all popups and keeps the main page open.

Usage Scenario: Suppose we want to open our Reference app on one window and Subject7’s website on another window and then close Subject7’s website using the text “Subject7”.

Procedure: Define a step that navigates to our Reference app and another step that opens Subject7’s website in another window. You can use Execute_Javascript with code: “window.open("https://www.subject-7.com");“. Once finished, define a step that closes the popup with text “Subject7”. Your steps will look like this:

14) COMPARE: Compares the left hand side value (LHS) with the right hand side value (RHS) based on the type (i.e. TEXT, NUMBER, DATE or IMAGE) and the operator selected. When selecting DATE, the format of the date on either side should be specified. You can use variables (variable name created by any SET commands prior to this command preceded by @) or hard-coded-values on either side of the equation. Comparison will be done "Frequency" number of times with "Interval" seconds in between each two comparisons. As soon as both values become available, the comparison will be performed. Frequency and Interval options are used mainly if either values (LHS or RHS) are generated asynchronously. This command also has the ability to alphabetically compare two strings and allows empty strings. The text comparison done as part of this command allows selection of "case sensitive" comparison between two texts. The default comparison is case insensitive.This command further allows comparison of two screenshots taken by SCREEN_SHOT command, The threshold field which appears when Image is selected can be used to determine how similar the images are before comparison takes place. Compare also supports arithmetic operations (example: Compare HALT NUMBER @var+1 = @var2). In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the RHS or LHS field. A list of variables will appear for you to select from.

 More...

Description: This command compares values such as text, numbers, dates and images, etc. In order to make the comparison, you need to have the values stored in variables, data template fields and/or constant values.

Usage Scenarios:
1- Suppose we want to compare two images taken with Screen_Shot command which were collected from the Communities page on our Reference app.

Procedure: Create a step with Compare command to compare between both screenshot_1 and screenshot_2 variables with operator "Not_Equal”. Your step will look like this:

image-20240201-164431.pngimage-20240201-164406.png

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_existing_communities_screenshot

The following video demonstrates how a comparison between two screenshots is done as part of execution of “subject7_existing_communities_screenshot” test case in “subject7_samples” folder:

Compare Images.mp4

2- Suppose we want to compare two dates, one is retrieved from the last time the profile was updated (added in Resume section of the profile) and the other is from the current system time.

Procedure: Define your step to retrieve the date from Resume using Get_Web_Value command and compare it to the current system time (format needs to be the same). Your steps will look like this:

image-20240206-102955.png

image-20240206-103134.png

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_modify_profile_information


3- Suppose we want to compare the status variable from a REST response to 200 to make sure that the request was successful.

Procedure: Define a step that makes a request (getting profile information) and another step that compares the status variable to "200" to make sure it is successful. Your steps will look like this:

image-20240206-103240.png

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_get_profile_by_id_using_rest

The video following video demonstrates how a comparison between a returned status code and “200” happens as part of execution of “subject7_get_profile_by_id_using_rest” test case in “subject7_samples” folder. If the status code is not “200”, this means that step 9 (Get_REST_Value) retrieved a different status code in which case the comparison step will fail.

compare api.mp4

15) CONTAINS: Checks whether a text/string contains another text/string. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in any of the fields. A list of variables will appear for you to select from. This command can also store the resulting Boolean value in a variable if needed.

 More...

Description: This command checks whether a sub-string exists on another string.
Usage Scenario: Suppose we want to retrieve the footer value from our Reference app and check if it contains the word "Social".

Procedure: Define a step that retrieves the string value of the footer using Get_Web_Value and another step with Contains command that checks the variable from Get_Web_Value and checks if it contains "Social". Your steps will look like this:

16) COOKIE: Adds cookies, removes cookies by names, or deletes all cookies. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in any of the fields. A list of variables will appear for you to select from.

 More...

Description: This command adds cookies, removes cookies by names, or deletes all cookies.

Usage Scenarios:

A- Suppose we want to add a "session-id" cookie after navigating to our Reference app.

Procedure: The cookie value will be generated randomly using a Set_Var step for the purpose of demonstrating this example. Define a step with Cookie command which adds a cookie name “session-id” with the value from the variable name preceded by @. Your steps will look like this:

B- Suppose we want to delete the previously added cookie "session-id".

Procedure: Define a step with Cookie command which deletes a cookie by the name “session-id”. You can also select “DELETE ALL” option to remove all cookies. Your step will look like this:

17) DESKTOP_CLEAR: Clears the content of a desktop element defined by a Desktop locator or by using the focused element on screen. Offset X and Y fields can be used in cases where the element appearance is different every time which could make the Desktop locator point to a different place. In such cases, an element that does not change (such as a label) can be used as an anchor and the offset points added so that the label is found and the direction is shifted from the label to this text box.

 More...

Description: This command is used to clear the content of a desktop element defined by a Desktop locator, by using the focused element on screen or by OCR using Use Text option. Offset X and Y fields can be used in cases where the element appearance is different every time which could make the Desktop locator point to a different place. In such cases, an element that does not change (such as a label) can be used as an anchor and the offset points added so that the label is found and the direction is shifted from the label to this text box.

Usage Scenario (1): Suppose we want to clear the contents of Notepad file without using Desktop_Hotkeys command to select all content and another Desktop_Hotkey command to Delete.

Procedure: Define steps that open a Notepad file. Then use Desktop_Clear command with “Use Focused Component” which will automatically delete the contents of the entire file when focus is on the file.


Usage Scenario (2): Suppose we want to clear the Run text box on Windows (WIN +R) but it does not always show the same content, so defining a Desktop locator may not find the correct element. In such case, we can use Desktop_Clear command to use a static object that does not change place (such as Open: label) and use Offset fields to move from this static object to the text box.

Procedure: Define a step that opens Run using Desktop_Hotkeys (Win + R). Then define a step that uses Desktop_Clear command. In the Reference Point, define a Desktop locator for Open: label. Afterwards, you can specify the Offset where X controls horizontal scope and Y controls vertical scope. Let’s use 60 horizontal offset points. Your steps will look like this:

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

2022-02-01 14-04-23.mp4

18) DESKTOP_CLICK: Clicks on any element (either on browser or desktop). This command uses image of the element or text as opposed to a locator. Any Desktop Locator element can be used in this command or you can specify the text of the element. Offset X and Y fields can be used in cases where the element appearance is different every time which could make the Desktop locator point to a different place. In such cases, an element that does not change (such as a label) can be used as an anchor and the offset points added so that the label is found and the direction is shifted from the label to the desired element. Extensions can be used to extend the region where the interaction will take place. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command clicks on a desktop element defined by a screenshot of the target (Desktop locator) or by OCR with the option Use Text.
Usage Scenario: Suppose we want to click the Start button on Windows 10.

Procedure: Take a screenshot of the Start bar icon and upload it to be used in a Desktop locator for the command to interact with. Your step will look like this:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how this step gets executed and the result is retrieved:

Desktop_click.mp4

19) DESKTOP_DOUBLE_CLICK: Double clicks on any element (either on browser or desktop). This command uses image of the element or text as opposed to a locator. Any Desktop Locator element can be used in this command or you can specify the text of the element. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command double clicks on a desktop element defined by a screenshot of the target (Desktop locator) or by OCR with the option Use Text.

Usage Scenario: Suppose we want to double click on Music folder in Windows 10.

Procedure: Take a screenshot of the Music folder and upload it to be used in a Desktop locator for the command to interact with. Your step will look like this:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Alternatively, you can use OCR Use Text option and enter the text Music

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

desktop_double_click.mp4

20) DESKTOP_DRAG_AND_DROP: Drags an element defined by a Desktop locator or text to another element or position. This command also supports delay before drag, delay before drop and move mouse delay which can be used with default or custom values. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command drags and drops a desktop element defined by a screenshot of the target (Desktop locator) or by OCR with the option Use Text to another element on screen.

Usage Scenario: Suppose we want to drag folder named “New Folder - Copy 5” to folder named “New Folder - Copy 6”.

Procedure: Take a screenshots of both folders highlighting the most distinguishable parts of the folders (Copy 5 / Copy 6) and upload them to be used in Desktop locators for the command to interact with. Your step will look like this:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Alternatively, you can use OCR Use Text option and enter the text New Folder - Copy 5 and New Folder - Copy 6

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  3. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

drag_drop.mp4

21) DESKTOP_EXISTS: Checks whether a desktop element, defined by a Desktop locator or text, exists on screen and returns true or false accordingly. The result can be used in a conditional IF statement. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command is used to check if a desktop element defined by a screenshot of the target (Desktop locator) or by OCR with the option Use Text exists on screen or not and returns a Boolean value accordingly.

Usage Scenario: Suppose we want to check if the folder named “Subject7 Test Folder” has been created by getting a value of "true" or “false”.

Procedure: Take a screenshot of the folder and upload it to be used in a Desktop locator for the command to interact with. Enter a variable name that will take a Boolean value upon execution. Your step will look like this:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Alternatively, you can use OCR Use Text option and enter the text Subject7 Test Folder

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  3. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

desktop_exist.mp4


22) DESKTOP_FILL: Fills a text field (either on browser or desktop) using an image defined in a Desktop locator, by "Use Focused Component" to interact with any focused element or by Use Text to enter a specific text to identify the element. When "Use Focused Component" is checked, this will allow completion of a desktop form much easier where an image is supplied to a Desktop command to interact with the first form element and then for the remainder, Desktop_Hotkeys + TAB and Desktop_Fill with “Use Focused Component” can be used to fill out the next form element. This way, only one image is needed to be uploaded/defined and the rest of the form elements can be tabbed through and completed. Offset X and Y fields can be used in cases where the element appearance is different every time which could make the Desktop locator point to a different place. In such cases, an element that does not change (such as a label) can be used as an anchor and the offset points added so that the label is found and the direction is shifted from the label to this text box. Extensions can be used to extend the region where the interaction will take place. The Similarity option improves the accuracy of verification. Using "Clear" option allows you to clear any text boxes before filling a value in them. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the value field. A list of variables will appear for you to select from. This list of variables includes variables that you can use to invoke hotkeys  ENTER, TAB and DELETE by entering (@system.key.enter / @system.key.tab / @system.key.delete).

 More...

Description: This command is used to fill a value into a desktop element defined by screenshot of the target (Desktop locator), by using focused component or by OCR with the option Use Text

Usage Scenario: Suppose we want to enter "This PC" after clicking Start button so that we can navigate the PC files as shown below:

Procedure: Create a step Desktop_Fill command, select "Use Focused Component" which will simply type the value you entered into the focused element (This PC). Your step will look like this:

  • NOTE: The Similarity field in “Use Locator” is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

Desktop_fill.mp4

23) DESKTOP_HOTKEYS: Allows using special keyboard keys such as Enter, Tab, function keys, etc for Desktop. This command further allows selection of keyboard keys and Alphabet keys. For example, to select all files in a folder using (CTRL + a), select Desktop_Hotkeys and then add two Hotkeys, one for CTRL and one for Key_a. The command allows using uppercase and lowercase letters (Key + A vs Key + a) as well as a variety of other keys. The Message field and logs will display the activated keystroke for this command. Sync Lock Hotkeys option can be used in case you are using any lock hotkey (Num / Caps / Scroll) and you would like to sync status on every execution so that this locks remains disabled without the need to use any lock hotkey in the command. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command is used to automatically press one or several keyboard keys to interact with desktop locators, focused component or elements identified by OCR in Use Text option.

Usage Scenario (1): Suppose we want to select all folders and hit delete so that they are deleted.

Procedure: Create a step that combines the pressing of CTRL and (key a) to use with Focused Component and another step that presses Delete. Your steps will look like this:

Select all step (CTRL + key_a)

Delete step:

NOTE: The Similarity field in “Use Locator” is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

hotkeys1.mp4

Usage Scenario (2): Suppose we want to go to a website and click CTRL+SHIFT+DELETE to show Clear browsing data screen.

Procedure: Create a step that combines the pressing of CTRL, SHIFT, and DELETE to use with Focused Component. If this step does not work, it means that Numbers Lock interferes with this interaction You can enable Sync Lock Hotkeys to switch off Num_Lock and keep sync in every execution. Your steps will look like this:

The following video demonstrates how these steps get executed:

hotkeys2.mp4

24) DESKTOP_MULTI_ACTION: allows to perform more complex operations such as holding Shift on the keyboard and many other desktop operations.

 More...

Description: This command is used to perform more complex operations such as holding Shift on the keyboard and many other desktop operations.

Usage Scenario: suppose we have a collection of files/folders where we must select only specific ones using one file/folder as a starting point, same as we can do when we use the mouse and SHIFT button.

Procedure: Define steps that navigate to the place where the files/folders are located and define a step that clicks on the file/folder which is a starting point. Then using Desktop_Multi_Action, select Key_Down with SHIFT to activate pressing SHIFT button. Then you can add steps using Desktop_Hotkeys with RIGHT to move to the right or LEFT to move to the left. Finally, you can add a step with Desktop_Multiaction with Key_Up with SHIFT to indicate that pressing SHIFT is finished. Your steps will look like this:

Starting Desktop_Multiaction activates pressing and holding SHIFT key on your keyboard

Desktop_Hotkeys with RIGHT activates pressing the Right arrow hotkey on your keyboard

Ending Desktop_Multi_Action step which activates dropping the pressed SHIFT key on your keyboard

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

The following video demonstrates how these steps get executed:

Desktop_multiaction.mp4

25) DESKTOP_RIGHT_CLICK: Right clicks on any element (either on browser or desktop). This command uses image of the element or text as opposed to a locator. Any Desktop Locator element can be used in this command or you can specify the text of the element. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command right clicks on a desktop defined by a screenshot of the target (Desktop locator) or by OCR with the option Use Text.
Usage Scenario: Suppose we want to right click on a newly created folder so we can click Copy.

Procedure: Take a screenshot of the folder and upload it to be used in a Desktop locator. Your step will look like this:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Alternatively, you can use OCR Use Text option and enter the text Subject7 Test Folder

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

Desktop_right_click.mp4

26) DESKTOP_SCROLL: Allows scrolling for a desktop application.

 More...

Description: This command scrolls up or down in the focused component using a size of your choosing.
Usage Scenario: Suppose we have created 50 folders and we need to scroll back up by 30 scrolls to see the top of the folder we are in.

Procedure: Define your step with Up as direction and enter 30 in the Scroll Size field. Your step will look like this:

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

27) DESKTOP_DYNAMIC_SCROLL: Allows scrolling to a desktop element until it is found or end of scroll is reached. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command scrolls up or down until it reaches a desktop locator that you define or a text that you enter in OCR Use Text option or finish the scroll size.

Usage Scenario: Suppose we have many folders and we want to scroll from our current position (top) to folder 50 (down).

Procedure: Define your step with Down as direction and enter 30 in the Scroll Size field. Then enter a locator with a screenshot of this folder highlighting the most distinguishable part of the folder. The command will navigate until it reaches the locator or finish the scroll size if the locator is not found. Your step will look like this:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Alternatively, you can use OCR Use Text option and enter the text Folder 50

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

28) DESKTOP_SHUTDOWN: Used to enter the names of the applications as seen on Task Manager > Details (without .exe). Once execution is finished, stopping the test case will close the applications.

 More...

Description: This command is used to enter the names of the applications as seen on Task Manager > Details (without .exe). Once execution is finished, stopping the test case will close the applications.

Usage Scenario: Suppose we have a test case that creates folders/files and once finished, Windows Explorer must be closed after the test case is stopped/finished.

Procedure: Create the steps necessary to create the folder/files. After that, create a step with Desktop_Shutdown command where the Process name will be “explorer”. Here’s a sample image of how you can identify the process name from Task Manager. You can enter any similar names but you must not include the extension (.exe) in the Process field in the command.

Your step will look like this:

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

The following video demonstrates how these steps get executed:

Desktop_shutdown.mp4

29) DESKTOP_VERIFY: Allows verification of an image for a desktop application. The Similarity option improves the accuracy of verification. The default value set for Similarity is 0.75 and can be increased for up to 0.98. As the number goes higher, it looks for more exact matches in the image.

 More...

Description: This command verifies the existence or non-existence of an element defined by a screenshot of the target (Desktop locator) or OCR using the option Use Text. It allows modifying verification attempts and intervals to a number of your choosing.
Usage Scenario: Suppose we want to check that "Subject7 Test Folder" is deleted and is no longer present on screen.

Procedure: Take a screenshot of the folder and upload it to be used in a Desktop locator. Your step will look like this:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Alternatively, you can use OCR Use Text option and enter the text Subject7 Test Folder

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

Desktop_verify.mp4

30) DOUBLE_CLICK: Double clicks a button or a widget identified by a web locator or inline XPath.

 More...

Description: This command double clicks on an element using a web locator or inline XPath.
Usage Scenario: Suppose you want to double click on a button that navigates to a website.

Procedure: Define steps that lead up to the point the button is visible and define a locator for the button so you can use it with Double_Click command. Your step will look like this:

Web Locator:

Inline XPath:

31) DRAG_AND_DROP: Provides the drag and drop functionality. For HTML5 widgets, HTML5 action needs to be selected otherwise Native should be.

 More...

Description: This command drags an element defined by a locator or inline XPath to another element defined by a locator or inline XPath using Native or HTML5 elements.
Usage Scenario: Suppose you want to drag a picture and drop it in a box.

Procedure: Define locators for both the picture and the box (or use inline XPaths) and use them in your steps. Your steps will look like this:

Web Locator:

Inline XPath:

32) ELSE: Adds an "else" statement to an already used "if" statement.

 More...

Description: This command allows creating an alternative step to execute in case the preceding condition is not met.

Usage Scenario: Suppose we want to add an alternative step to execute if the value of the Birthday text box in our Reference app is not blank.

Procedure: Define a step that retrieves the value of the Birthday text box and define conditional steps that execute according to the result.

Conditions:

1- If the value is empty, fill it with “10.10.1991” and print “Profile has been updated, birthday has been added”.

2- Else, print “Birthday has not been updated because it already exists”.

Your steps will look like this:

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_modify_profile_information

The following video demonstrates how the “Birthday” is filled in case it is found to be empty as part of execution of “subject7_modify_profile_information” test case in “subject7_samples” folder:

Subject7 Video 8.mp4

Whereas the following video demonstrates how the alternative step is executed in case the “Birthday” field is not empty. A random value was entered in the field to simulate this scenario.

Subject7 Video 9.mp4

33) ELSE_IF: Adds an "else if" statement to an already used "if" statement. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the right value or left value fields. A list of variables will appear for you to select from.

 More...

Description: This command executes executes a step when the preceding If condition is not met. Otherwise, it skips the condition and moves to the next step.

Usage Scenario: Suppose we need to compare the number of profiles on our Reference app and print a message if it is less or equal to 100, or print another message if it is greater than 100 .

Procedure: Define a step with Get_Web_Value command (with either one of the XPaths below) that counts the profiles and an If command for the initial check of less than or equal to 100. Define an Else_IF command for the greater than 100 step. Your steps will look like this:

count(//th[@scope='row' and @class='ng-binding'])

count(//a[contains(@href,'profile') and @class='ng-binding'])

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_count_profiles


34) END_IF: Closes an "if" statement which may include a series of ELSE_IF and ELSE statements as well.

 More...

Description: This command ends an already existing IF statement.
Usage Scenario: Suppose we want to end an existing IF statement where the Birthday text box is filled if it is empty or a message is printed if it has a value. Once the condition is finished, the statement will end with this command.

Procedure: Define your conditional steps and the final step will use the command End_If. Your steps will look like this:

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_modify_profile_information

The following video demonstrates how the condition has ended when checking if the “Birthday” field is empty or not as part of the execution of “subject7_modify_profile_information” test case in “subject7_samples” folder:

Subject7 Video 8.mp4

35) EXECUTE_COMMAND: allows execution of an operating system-specific commands. This command also allows storing the output message into a variable and "Ignore Output" checkbox can be used in case you do not want to know what the output of the command is.

 More...

Description: This command allows execution of an operating system-specific commands.
Usage Scenario: Suppose you want to print a message using echo command as can be done in the command line or powershell and store the message in a variable.

Procedure: Define your step and add 4 commands in the OS Native Command field.

Command Prompt:

Example (1): Typing a message using echo command

cmd or cmd.exe

/c

echo this is a test

Your step will look like this:

On execution, your result will look like this:

Example (2): Retrieving the default username on Windows for dynamic file verification purposes. This can be done by adding the commands below. Note that this will send a value back, so Variable option should be picked on the command and a variable name provided.

cmd or cmd.exe

/c

echo %username%

Your step will look like this:

On execution, your result will look like this:

Windows Powershell

powershell

echo this is a test

Your step will look like this:

On execution, your result will look like this:

36) EXECUTE_JAVA: Makes a call to a snippet of Java/Selenium/Appium code you have written and uploaded to Subject7. Method field specifies the function/method to call in the code written. "Ignore Web Driver" option should be used for Appium code and "Ignore Appium Driver" should be used for Selenium code.

 More...

Description: This command makes a call to a snippet of Java/Selenium/Appium code you have written and uploaded to Subject7. Method field specifies the function/method to call in the code written.

Usage Scenarios:

A- Suppose we want to register on Reference app using a randomly generated password.

Procedure: Create a snippet that uses Java code to generate a random password. In your command options, enter the method “generate” which will automatically generate a random password for use in the registration. Your step will look like this:

B- Suppose we want to use Execute_Java to click on Register button.

Procedure: Create a snippet where Selenium files (.jar) are used as dependencies. In your command options, enter the method “clickRegisterButton” which will simulate clicking on the Register button. Your step will look like this:

Attachments and source code:

com.subject7.PasswordGenerator:

import java.util.Map;

public class PasswordGenerator {
    private Map<String, String> parameterMap;

    public void setParametersMap(Map<String, String> parameterMap) {
        this.parameterMap = parameterMap;
    }

    public String generate() {
        String password = "5a8bxzFQxtRjY2zp";
        parameterMap.put("@generated_password", password);

        return "PASS,Password generated successfully.";
    }
}

com.subject7.WebAssistant:

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import java.util.Map;

public class WebAssistant {
    private WebDriver webDriver;
    private Map<String, String> parameterMap;

    public void setParametersMap(Map<String, String> parameterMap) {
        this.parameterMap = parameterMap;
    }

    public void setWebDriver(WebDriver webDriver) {
        this.webDriver = webDriver;
    }

    public String clickRegisterButton() {
        try {
            String registerButtonXpath = parameterMap.get("@registerButtonXpath");
            WebElement element = webDriver.findElement(By.xpath(registerButtonXpath));
            element.click();
        } catch (Exception e) {
            return "FAIL," + e.getMessage();
        }

        return "PASS,Clicked.";
    }
}

37) EXECUTE_JAVASCRIPT: Allows execution of a Javascript command or a series of them. This command allows passing locators as arguments to javascript command. For example, to pass a locator to Javascript command scrollIntoView, you can use the following Javascript command arguments[0].scrollIntoView(true) where arguments[0] is coming from the newly added Arguments portion of the wizard.

 More...

Description: This command is used to execute one or several JavaScript commands.
Usage Scenario: Suppose we want to use a simple JavaScript command on Reference app to move back to the previously opened page on the browser (list of Communities) so that another community can be selected and a new logo image uploaded to it.

Procedure: Define steps that lead up to opening the first community and enter “history.go(-1)” as your JavaScript command. Once the first Community is updated, the JavaScript command will execute and move back to the Community list. Your steps will look like this:

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_add_community_image

38) EXECUTE_REST: Makes a call to a REST end-point that does not return anything. As part of this command, the returned JSON can be validated by selecting "Validate" and supplying a RAML file. The HTTP response code will be assigned to "Status variable name". This command keeps the response status in a file with a link in the message field to be used in testing logic afterwards. Web service response can be read and copied after this command is executed.

 More...

Description: This command is used to make a call to a REST end point to perform a request without the need to verify the response.

Usage Scenario: Suppose we want to update a profile through a REST API which includes updating a birthday, city, country, or any other data.

Procedure: Define Set_Var steps that contain the information you want to update in variables. For example, a Set_Var step with variable name “city” has a value of "New York City". Additionally, you can define a Set_Var step that contains the User ID you are trying to update and enter the variable name preceded by @ in your REST connection.

REST Connection URL example where @id uses a variable defined in a Set_Var step

Your steps will look like this:

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_update_profile_using_rest

The video following video demonstrates how a profile is updated through a REST API endpoint using Execute_REST as part of execution of “subject7_update_profile_using_rest” test case in “subject7_samples” folder:

Subject7 Video 11.mp4

39) EXECUTE_SELENESE: Executes a Selenese element. This command  covers the following scenarios:
*Wait (For example WAIT 3 or WAIT “3” can both be used inside Execute_selenese)
*FILL supports empty variables (for example in the step FILL //*[@id='asd'] "@var" if var is empty, it does not fail)

 More...

Description: This command executes a Selenese object stored in Subject7 which was recorded using Selenium IDE.
Usage Scenario: Suppose you want to navigate to https://reference.subject-7.com and log in using your credentials.

Procedure: Record this using Selenium IDE. Convert the file/script using Subject7 (by going to Repository> Selenese Repository > New Object > Converter) so that it can be used in your test case. Once you finish converting, select the object in your step. Your step will look like this:

40) EXECUTE_SOAP: Makes a call to a SOAP web service. Web service response can be read/copied/downloaded after this command is executed.

 More...

Description: This command makes a call to a SOAP web service where the web service response can be read/copied/downloaded after this command is executed.

Usage Scenario: Suppose we want to make a call to a SOAP service.

Procedure: Define a SOAP Connection and enter the name, URL, body and other parameters needed. Select the SOAP connection in your step for execution. Your step will look like this:

41) EXECUTE_SQL: Executes a SQL statement supplied by a "Query" or a series of SQL statements supplied by a "File" that do not return any values by making a connection to the "Connection" field

 More...

Description: This command executes a statement using a query or several statements using a file without returning any value.

Usage Scenario: Suppose we want to create a new table named "users" in our PostgreSQL database.

Procedure: Define a query that creates a table using values from variables such as below:

CREATE TABLE @table_name (
    @field1 integer NOT NULL,
    @field2 text NOT NULL,
    @field3 text,
    @field4 text,
    @field5 text,
    @field6 boolean
);

Define your variables in your steps which will be: @table_name, @id, @username, @firstname, @lastname, @email', @enabled. Once finished, define a step with Execute_SQL as a command and select the query you added in Subject7 as well as your DB Connection (You will need to edit the DB Connection to include your own database parameters: Username/Hostname/Vendor, etc). Your steps will look like this:

42) FILE_UPLOAD: Allows interaction with a file upload widget identified by "Locator" field or a URL to upload the file included in the "File/File URL" fields. The uploaded filename can be renamed to "Uploaded Filename" if a name is supplied there otherwise the file name selected in the "File" field will be the name used. This command populates the newly uploaded file automatically in the wizard. The XPath used for the locator in this command must reference part of the DOM that has an input tag with attribute "type" which has a value of "file" in order for the command to work successfully.

 More...

Description: This command is used with file upload widget (Defined by a locator with an XPath that has input tag with type = “file”) to upload a file included in the file field.
Usage Scenario: Supposed we want to upload an image as a logo to the first community that appears on our Reference app.

Procedure: Define a locator for the “Choose File” button using an XPath that directs to the input tag. The HTML tag for the input tag is

<input ng-show="ctrl.check() == 1" type="file" accept="image/*" file-model="avatar" class="">

and the XPath is

(//text()[contains(.,'Upload')]/ancestor::div/descendant::input)[1]

Once finished, upload a file to Subject7 and select it from File in your command options. Your step will look like this:

Web Locator:

image-20240206-125052.pngimage-20240206-125112.png

Inline XPath:

image-20240206-125052.pngimage-20240206-125159.png

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_add_community_image

The video following video demonstrates how the first community logo is uploaded as part of execution of “subject7_add_community_image” test case in “subject7_samples” folder:

File Upload.mp4

43) FILL: Fills "value" in a text field or a text area identified by a web locator or inline XPath. If "Clear" is checked, the command will clear the text field or the text area before filling it out otherwise it will append it to whatever is already included in the text field or text area. This command further allows encryption of the data in the wizard itself instead of having to create a data template to achieve it. JavaScript Prompt on the wizard is used to handle Prompt Box (i.e AlertBox with a text field in it). In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the value field. A list of variables will appear for you to select from. This list of variables includes variables that you can use to invoke hotkeys  ENTER, TAB and DELETE by entering (@system.key.enter / @system.key.tab / @system.key.delete).

 More...

Description: This command is used to fill any value in a text box or text area defined by a locator or inline XPath.

Usage Scenario: Suppose we want to fill the “Email” text box on our Reference app after navigating to the Login page.

Procedure: Define a locator for the text box where the HTML tag is, or use an inline XPath

<input id="email" type="email" name="email" class="form-control ng-pristine ng-valid ng-empty ng-valid-email ng-touched" placeholder="Email" autofocus="" ng-model="ctrl.credentials.username" style="">

The XPath is:

//input[contains(@placeholder, 'Email')]

Select the locator in your command options and enter a value in the “Value” field. Your steps will look like this:

Web Locator:

image-20240206-134108.pngimage-20240206-134125.png

Inline XPath:

image-20240206-134108.pngimage-20240206-134202.png

See the Test Library path: subject7_samples/subject7_basic_suite/subject7_website_login_logout

The video following video demonstrates how the the “Email” and “Password” fields are filled in the execution as part of “subject7_website_login_logout” test case in “subject7_samples” folder:

Fill.mp4

44) FILL_PDF: Fills out a PDF file identified by a URL or a file name based on a series of commands specified in the "Desktop script".

 More...

Description: This command fills a PDF identified by a URL or a file name using commands added in Desktop Scripts.
Usage Scenario: Suppose we want a file to download after clicking on it and then open it to fill the form inside it.

Procedure: Enter the download path of the file, the source type (URL,file) and select your Desktop script which contains the command and Desktop locator to interact with it. Your step will look like this:

Desktop script:

45) GET_COOKIE_VALUE: Retrieves the value of a cookie or a few cookies by names and assigns the results to comma-separated variables specified in the "variable name" field. If no cookies are set with a specific name, a warning is generated on the step where this command was used.

 More...

Description: This command retrieves cookies values and assigns them to variables.

Usage Scenarios:

A- Suppose we want to retrieve a cookie by name "session-id" which was added using a randomly generated session-id for the sake of this example.

Procedure: Define a step with Get_Cookie_Value command, enter a variable name and enter the cookie name. Your steps will look like this:

B- Suppose we want to verify that the cookie value is "null" after deleting the cookie from the site. Your steps will look the same as in Scenario A but will bring the result as “null”.

46) GET_CURRENT_URL: Retrieves current URL value and assigns it to "variable name".

 More...

Description: This command retrieves the current URL and assigns it to a variable.

Usage Scenario: Suppose we want to get the URL of the profile that was logged in on Reference app which shows the profile number.

Procedure: Define steps that log into our Reference app and navigate to the profile and a final step with Get_Current_URL which will retrieve the URL. Your steps will look like this:

47) GET_DB_VALUE: Executes a SQL statement supplied by a "Query" or a series of SQL statements supplied by a "File" that return values by making a connection to the "Connection" field and storing the results in a comma-separated set of variables specified in the "Variable name" field. "Character to Exclude" fields can be used to remove some characters from the results. These excluded characters can be hard-coded-values or Regular Expressions (RegEx). This command is also able to allow multi-select from a database. If your selected command returns multiple values, use a comma-separated list in the variable name field.

 More...

Description: This command executes an SQL statement using a query or a statements using a file and assigns the values to variables.
Usage Scenario: Suppose we want to get the id, username, first name, last name and email address from the table by the name of users and then print them.

Procedure: Define your step with Get_DB_Value command and enter variable names for each of the fields. Set your DB Connection (You will need to edit the DB Connection to include your own database parameters: Username/Hostname/Vendor, etc) and use the query such as the below to retrieve the data. The print command will print the data.

QUERY: SELECT * FROM @table_name;

Your steps will look like this:

48) GET_DESKTOP_VALUE: retrieves values from desktop screens or from your clipboard and assigns a values to a variable. For Linux and MacOS users, some libraries are required for installation and the command will navigate to instructional pages on how to install these libraries. For Windows users, please make sure Microsoft Visual C++ 2015-2019 is installed.

 More...

Description: This command is used to retrieve values from desktop screens or from the clipboard and assigns a values to a variable. Reference points for the elements include desktop locators or by OCR Use Text option. For Linux and MacOS users, some libraries are required for installation and the command will navigate to instructional pages on how to install these libraries. For Windows users, please make sure Microsoft Visual C++ 2015-2019 is installed.

Usage Scenario: Suppose we have a .docx document as below that contains 8 random lines determined by a prefix ‘Line number:’ and we want to get the content next to the 5th line and store it in a variable.

Procedure: Define steps that lead up to the point where the document is opened. Then use Get_Desktop_Value command, enter a variable name, select “Text Recognition” as Read Type and select “Text” as Result Type. The reference point in this command is “Line 5:”, so we will need to define a Desktop locator for this text only. Once a Desktop locator is defined, we will need to determine how to move from “Line 5:” to the text next to it using Offset points and extend the region dimensions using Extension field. For the purpose of this example, we used 60 horizontal offset points ( X ) and 600 extension points to the right. The step will look as below:

  • NOTE: The Similarity field is to adjust the matching approximation (minimum of 0.10 - maximum of 0.98 - default of 0.75) which improves the accuracy of matching the exact image in the case of multiple images with similar appearance.

Tip: Read Types:

A- Text Recognition: This type uses OCR to read the text and assign it to a variable name

B- Clipboard: This type copies the text value to your clipboard and assigns it to a variable, but only works with input fields, not labels.

Desktop commands are controlled by Locator Timeouts under User Execution Preferences. If the locator timeout is not sufficient enough for the command to find the element, you can increase Locator Timeout to give the step more time to work. It’s recommended to use 20 seconds for desktop commands.

Notes:

  1. If you do not see any highlight during execution, please enable the option Desktop Highlight under User Execution Preferences and save.

  2. Offsets can be used to to shift the search region from the supporting element. This field accepts positive and negative values. The X field will shift horizontally (positive value = move to the right / negative value = move to the left) and the Y field will shift vertically (positive value = move downwards / negative value = move upwards)

  3. Extensions can be used to extend/shrink the area to interact with as seen by the highlight during execution. This field accepts positive and negative values.

  4. Crop Region Offset can be used to designate an area for execution to look through to reduce execution duration and ensure additional accuracy. The values provided will crop the area. For example, if you provide 50 points in the Left field, only the 50% of the right side of your screen will be interacted with.

  5. Multiline can be used to interact with text which is visible on multiple lines.

The following video demonstrates how these steps get executed:

2022-02-01 13-37-54.mp4

49) GET_GLOBAL_VAR: Retrieves the value of a global variable so that it can be used in any test case/execution set/load test. To retrieve the value of a global variable, a test case with Set_Global_Var must be executed first in order for the value to be stored in the server. Then the same variable name must be entered in the step with Get_Global_Var in order to retrieve the value from the server to be able to use this variable.

50) GET_MOBILE_VALUE: Need a native mobile license to view/use this command. Reads a value from the native mobile screen and stores it in the "variable name". By default, it reads the text of the mobile locator. If you want to read the value of a specific attribute, you can change the Attribute from TEXT to the actual attribute name of interest. Type can be used to read a value of a mobile locator/node, boolean (true or false), number, or string. "Append Timestamp Separator" is an optional field that can be used to append a unique timestamp at the end of the value read from screen. "Character to Exclude" fields can be used to remove some characters from the results. These excluded characters can be hard-coded-values or Regular Expressions (RegEx).

 More...

Description: This command is used to retrieve a value from a native mobile screen and store it in a variable. By default, it reads the text of a mobile locator, but if you want to read the value of a specific attribute, you can change the Attribute from “text” to the actual attribute name of interest. Type can be used to read a value of a mobile locator/node, boolean (true or false), number, or string.

Usage Scenario: Suppose we want to get the the date from Wikipedia app which appears on “Today on Wikipedia” section.

Procedure: Prepare steps that run the app and create a step with Get_Mobile_Value command that gets the text “Main page on Jan 7, 2021” highlighted below:

Your step will look like this:

Once executed, the step will retrieve the entire text “Main page on Jan 7, 2021”. You can use Sub_String command to extract only the date as below:

51) GET_REST_VALUE: Makes a call to a REST end-point that returns values. As part of this command, the returned JSON can be validated by selecting "Validate" and supplying a RAML file. The HTTP response code will be assigned to "Status variable name". Keys can be provided if return type is JSON and values of the keys are of interest and xpath's can be provided if return type is XML and values of the xpaths are of interest. Resulting values can be stored in comma-separated variables specified in the "variable name". The command and REST Connection headers also take any var or template value in the header with any required random header key. This command further keeps the response status to be used in testing logic afterwards. This command supports JSON paths. Web service response can be read and copied after this command is executed.

 More...

Description: This command retrieves a value from the response received from a call to a REST end point which can be used anywhere in your test case.

Usage Scenario: Suppose we want to get some information from the response about a profile by entering its ID number.

Procedure: Define a step with Get_Rest_Value which contains exactly which data you are trying to retrieve in JSON. For exmaple, to retrieve the first name of a user, we can use "firstName”. To identify which user the request is sent for, you can use a variable to store the user ID in a Set_Var step which starts before Get_Rest_Value step. The same variable name needs to be in the REST Connection URL field.

REST Connection URL example where @id uses a variable defined in a Set_Var step

Your steps will look like this:

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_get_profile_by_id_using_rest

The video following video demonstrates how information is retrieved from a REST API endpoint using Get_REST_Value command as part of execution of “subject7_get_profile_by_id_using_rest” test case in “subject7_samples” folder:

Subject7 Video 13.mp4

Reference API

52) GET_SOAP_VALUEMakes a call to a SOAP web service. XPath's can be provided if values of the XPaths are of interest. Resulting values can be stored in comma-separated variables specified in the "variable name". Special characters can be eliminated from resulting values. Web service response can be read/copied/downloaded after this command is executed. XPath type 'RESPONSE_BODY' doesn't require value and will save the response to the desired variable.

 More...

Description: This command allows executing a SOAP web service and query the return and store the query result into a variable.

Usage Scenario: Suppose we want to retrieve the the value of node “firstName”.

Procedure: Define your step, enter the XPath and select the type “NODE_VALUE”. Enter the value and select your SOAP connection. Your step will look like this:

53) GET_SSH_VALUE: Connects to a "connection", executes the commands specified by the "Commands" and the results are stored in comma-separated variables specified in the "variable name". The result/output for each SSH executed command will be shown as well.

 More...

Description: This command connects to an SSH saved in SSH connections, executes the commands specified by the "Commands" and the results are stored in comma-separated variables specified in the "variable name". The result/output for each SSH executed command will be shown as well.

Usage Scenario: Suppose want to print the message “This is an automated Subject7 test” and assign it to a variable.

Procedure: Define your SSH connection and use it in your step. Enter “echo This is an automated Subject7 test” in the Commands field which will print the message. Your step will look like this:

Upon execution, your message will be printed and assigned to the variable name you used.

 References...

54) GET_WEB_VALUE: Reads a value from the browser screen and stores it in the "variable name". By default, it reads the text of the web locator or inline XPath. If you want to read the value of a specific attribute, you can change the Attribute from TEXT to the actual attribute name of interest. Type can be used to read a value of a HTML tag, boolean (true or false), number, or string. It also allows character exclusion when using along with JavaScript returning a value. "Append Timestamp Separator" is an optional field that can be used to append a unique timestamp at the end of the value read from screen. "Character to Exclude" fields can be used to remove some characters from the results. These excluded characters can be hard-coded-values or Regular Expressions (RegEx). This command also allows CSS Type so that CSS attributes as well as Pseudo-elements can be read into variables.

 More...

Description: This command is used to retrieve a value from any element on the browser screen and store it in a variable. The default setting allows it to capture a text (HTML tag - Text), but you can also capture other HTML Tags, CSS properties, numbers, strings or boolean values.


Usage Scenarios

HTML Tag with attributes

(Scenario 1) Suppose we want to retrieve the text value from the Birthday text box on our Reference app which is found on the Edit Profile page and assign it to a variable.

Procedure: Define a locator with reference name “reference_edit_profile.text.birthday” or use inline XPath where the HTML tag is:

<input type="text" id="birthday" ng-model="ctrl.profile.birthday" placeholder="dd.MM.yyyy" class="form-control ng-pristine ng-valid ng-isolate-scope ng-not-empty ng-valid-date ng-touched" uib-datepicker-popup="dd.MM.yyyy" datepicker-options="ctrl.datePicker.options" is-open="ctrl.isOpen" enable-time="false" close-text="Close" style="">

The XPath is:

//input[@id='birthday']
or
//label[contains(@for, 'birthday')]/ancestor::div/descendant::input[@placeholder='dd.MM.yyyy']

In the command options, select the locator and use HTML tag as a Type with "TEXT" as an attribute.
Your steps will look like this:

Web Locator:

image-20240215-161108.png

Inline XPath:

image-20240215-161140.png

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_modify_profile_information

The following video demonstrates how the “Birthday” text box value is retrieved as part of execution of “subject7_modify_profile_information” test case in “subject7_samples” folder. Since the original value is empty, a random one has been entered to simulate this test.

get_web_value_birthday.mp4

Tip: The Attribute field accepts variables and template injections if you would like to pass values to it.

(Scenario 2) Suppose we want to retrieve the hyperlink in the Reference header and assign it to a variable.

Procedure: Define a locator with reference name “reference.link.header” or use an inline XPath where the HTML tag is:

<a class="navbar-brand" href="/">Social Network</a>

The XPath is:

//a[contains(text(),'Social Network')]

When inspecting the element and looking at the HTML page, we see that “href” contains the URL of the hyperlink. Instead of the default Attribute value of “TEXT”, we can use “href” in the command options. Our step will look like this:

Web Locator:

image-20240215-161311.png

Inline XPath:

image-20240215-161342.png

See the video below that demonstrates this scenario. You can also use the snippet below in Advanced View to test it:

WEB GOTO_URL "https://reference.subject-7.com" HALT ON ERROR 
WEB VALUE_GET RESULT_VARIABLE variable SOURCE ELEMENT XPATH "//a[contains(text(),'Social Network')]" ALIAS "social_network" XML_TYPE "{http://www.w3.org/1999/XSL/Transform}NODE" ATTRIBUTE "href" HALT ON ERROR
get_web_value_href.mp4

(Scenario 3) Suppose we want to retrieve the location (URL) of the profile image in Reference app and assign it to a variable.

Procedure: Define a locator with reference name “reference.image.profile_image” or use an inline XPath where the HTML tag is:

<img ng-src="/images/default-avatar.png" class="profile-photo-lg" src="/images/default-avatar.png">

The XPath is:

//text()[contains(.,'profile')]/ancestor::div/descendant::img
or
//img[@class='profile-photo-lg']

When inspecting the element and looking at the HTML page, we see that “src” contains the URL of the image. Instead of the default Attribute value of “TEXT”, we can use “src” in the command options. Our step will look like this:

Web Locator:

image-20240215-161427.png

Inline XPath:

image-20240215-161510.png

See the video below that demonstrates this scenario. You can also use the snippet below in Advanced View to test it:

WEB GOTO_URL ${subject7_reference_environment.url} HALT ON ERROR 
CALL FUNCTION subject7_reference_login HALT ON ERROR 
WAIT 2 HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_general.link.profile HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_main_page.link.profile_settings HALT ON ERROR 
WEB VALUE_GET RESULT_VARIABLE image_src SOURCE ELEMENT XPATH "//text()[contains(.,'profile')]/ancestor::div/descendant::img" ALIAS "" XML_TYPE "{http://www.w3.org/1999/XSL/Transform}NODE" ATTRIBUTE "src" HALT ON ERROR
Get_web_value.mp4

CSS with Attributes

(Scenario 4) Suppose we want to retrieve font size of a post under a profile on Reference app and assign it to a variable.

Procedure: Define steps that navigate to Reference app and open the profile to see the posts. Then define a locator for one of the posts or use an inline XPath (you can add a post if the profile does not have any). The HTML tag is similar to:

<p class="ng-binding">EXAMPLE</p>

and the XPath is similar to:

//p[contains(text(),'EXAMPLE (4)')]
or
(//p[contains(text(),'EXAMPLE')])[1]

When inspecting the text in Chrome, we see Styles box under the HTML page. We can find any specific attribute using the Filter box.

image-20240215-161713.png

To retrieve attribute values in Get_Web_Value, we must select CSS as a Type and the attribute will be the one we found in Chrome. For example, let’s use the attribute below which will show the size of the text in the post.

font-size

Your step will look like this:

Web Locator:

image-20240215-161816.png

Inline XPath:

image-20240215-161858.png

See the video below that demonstrates this scenario. You can also use the snippet below in Advanced View to test it:

WEB GOTO_URL ${subject7_reference_environment.url} HALT ON ERROR 
CALL FUNCTION subject7_reference_login HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_general.link.profile HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_main_page.link.profile_settings HALT ON ERROR 
WAIT 1 HALT ON ERROR 
WEB VALUE_GET RESULT_VARIABLE font_size SOURCE LOCATOR subject7_reference_posts.cell.existing_post XML_TYPE "CSS" ATTRIBUTE "font-size" HALT ON ERROR
Get_web_Value - Css.mp4

Numbers

(Scenario 5) Suppose we have a post containing only numbers in Reference app and we want to retrieve the number and assign it to a variable.

Procedure: Define steps that navigate to Reference app and open the profile to see the posts. Then define a locator or use inline XPath for the text of the post that contains the number.

The HTML tag is similar to:

<p class="ng-binding" style="" xpath="1">EXAMPLE</p>

and the XPath is similar to:

(//span[contains(text(),'post')]/ancestor::div/descendant::p)[3]
or
//p[@class='ng-binding']

Now all we have to do in the command options is to select Number as Type. Our step should look like this:

Web Locator:

image-20240215-162249.png

Inline XPath:

image-20240215-162326.png

See the video below that demonstrates this scenario. You can also use the snippet below in Advanced View to test it:

WEB GOTO_URL ${subject7_reference_environment.url} HALT ON ERROR 
CALL FUNCTION subject7_reference_login HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_general.link.profile HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_main_page.link.profile_settings HALT ON ERROR 
WAIT 1 HALT ON ERROR 
WEB VALUE_GET RESULT_VARIABLE get_number SOURCE LOCATOR subject7_reference_posts.div.existing_posts XML_TYPE "{http://www.w3.org/1999/XSL/Transform}NODE" ATTRIBUTE "TEXT" HALT ON ERROR
Get_web_Value - number .mp4

Strings

(Scenario 6) Suppose we have a post containing a string in Reference app and we want to retrieve the string and assign it to a variable.

Procedure: Define steps that navigate to Reference app and open the profile to see the posts. Then define a locator or use inline XPath for the text of the post that contains the string.

The HTML tag is similar to:

<p class="ng-binding" style="">EXAMPLE</p>

and the XPath is similar to:

//p[contains(text(),'EXAMPLE')]

Now all we have to do in the command options is to select Number as Type. Our step should look like this:

Web Locator:

image-20240215-162634.png

Inline XPath:

image-20240215-162715.png

See the video below that demonstrates this scenario.

Get_web_Value - string.mp4

Boolean

(Scenario 7) Suppose we have a post containing text in Reference app and we want to use Get_Web_Value with Boolean to see if the text is found or not by returning a “true” or “false” value.

Procedure: Define steps that navigate to Reference app and open the profile to see the posts. Then define a locator or inline XPath for the text of the post that contains the text.

The HTML tag is similar to:

<p class="ng-binding" style="" xpath="1">EXAMPLE</p>

and the XPath is similar to:

//p[contains(text(),'EXAMPLE')]

Now all we have to do in the command options is to select Boolean as Type. Our step should look like this:

Web Locator:

image-20240215-162756.png

Inline XPath:

image-20240215-162838.png

See the video below that demonstrates this scenario:

Get_web_Value - boolean.mp4

Javascript

(Scenario 1) Suppose we want to retrieve the number value from a string using Javascript/RegEx and store it in a value.

Procedure: In a step with Get_Web_Value, click Javascript Source Type and add your code in the Script box. For example:

var text = 'ABC12345 XYZ678'
var numbers = text.replace(/\D/g,'');
return numbers

PS: Return statement can always be used to return a value in order to store it in a variable.

Your step will look like this:

image-20240215-163057.png

Once the test is executed, the numbers will be stored in a variable as shown below:

image-20240215-163149.pngimage-20240215-163139.png

See the video below that demonstrates this scenario. You can use console.log() instead of return if you would like to test on Console.

javascript.mp4

55) GOTO_URL: Navigates to a specified URL.

 More...

Description: This command is used to navigate to a URL which is added in the URL field.

Usage Scenario: Suppose we want to navigate to Reference app site which is "https://reference.subject-7.com”.

Procedure: Copy the URL and enter it in the URL field in command options or to avoid hard-coding, you can use a data template and a data set to store the URL. Your step will look like this:

image-20240223-114508.png

See the Test Library path: subject7_samples/subject7_basic_suite/subject7_website_login_logout

The following video demonstrates how Goto_URL command is executed as part of the test case “subject7_website_login_logout” in “subject7_samples” folder:

goto_url.mp4

Reference App

56) Group: Used to start a new group of steps and this command allows adding a name for the group. When you hover over the step and hover over the down arrow, you can start adding steps to the group by appending or prepending to the group. You can also ungroup the steps by clicking ungroup which will bring the steps out of the group and remove the group.

57) HOTKEYS: Allows issuance of CTRL_F5 or Escape key strokes.

 More...

Description: This command allows issuing keystrokes for Ctrl+F5 and Escape.
Usage Scenario: Suppose we want to navigate to Reference, click Login, fill a value in Email address field and then refresh the page.

Procedure: Define steps that lead up to the point where value is filled in Email address field. Enter a step with Hotkeys command and select “CTRL_F5” hotkey. Your steps will look like this:

58) HOVER: Hovers over a widget identified by a web locator or inline XPath.

 More...

Description: This command hovers over an element defined by a locator or inline XPath.
Usage Scenario: Suppose we want to hover on the Login button in our Reference app after clicking on Login link.

Procedure: Define a locator for your button using XPath (“//a[contains(text(),'LOGIN')]”) or use inline XPath field in your step. Your step will look like this:

Web locator:

Inline XPath:

59) HOVER_AND_CLICK: Hovers over a widget and then clicks on another widget.

 More...

Description: This command hovers over an element defined by a locator and then clicks on it.
Usage Scenario: Suppose we want to hover on the Login button in Reference app and then click on it.

Procedure: Define a locator for your button using XPath (//a[contains(text(),'LOGIN')]) and use it in your step. Your step will look like this:

Web Locator:

Inline XPath:

60) IF: Adds an if statement in the test case. Left and right values of this command can be hard-coded-values or variables. Types of values to compare can be text, number, date or image. If date is used, the format of the dates used can be specified. Operator decides what type of comparison is to be made. The command will automatically add a blank step for you to fill and will also add a step with End_If to close the condition. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in right value or left value fields. A list of variables will appear for you to select from. This command can also store the resulting Boolean value in a variable if needed.

 More...

Description: This command is used to add an If statement under which another step(s) will be executed based on the result of comparison.

Usage Scenario: Suppose we want to see if the value in Country text box on our Reference app is blank or not and if it is blank, we want to fill it with a value.

Procedure: Use Get_Web_Value command to retrieve the current value in Country text box. Add a step with If command and in the Left Value, enter the variable name preceded by @. Leave the Right Value blank. The operator needs to be “Equal” which means our next step will perform only if the value in Country text box is blank. Your next step is to use a Fill command with value “USA”. The remaining Print steps will execute depending on which condition is met. Your steps will look like this:

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_modify_profile_information

The following video demonstrates how “Country” text box is checked and filled depending on the condition as part of execution of “subject7_modify_profile_information” test case in “subject7_samples” folder:

Subject7 Video 10.mp4

61) LOOP: Loops from "Start" to "End" with increment of "Step" and loop variable of "variable name". Loop also supports arithmetic operations (example: Loop HALT i 1 @max+1 1). The command will automatically add a blank step for you to fill and will also add a step with Loop_End to close the loop.

 More...

Description: This command is used to loop from Start to End with Step used as an increment and stores a Variable.
Usage Scenario: Suppose we want to add users to the Blacklist on our Reference app by looping through the steps that block users one by one.

Procedure: Define a step with Loop command that runs 4 times (Start: 1 / End: 4 / Step: 1) and after the loop step, add the steps that perform blocking the user. Your steps will look like this:

*NOTE: The steps that perform blocking the users have been set to “Continue on Failure” which prevents them from failing the entire test case if the number of the users to be blacklisted is less than 4.

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_add_user_to_blacklist

The following video demonstrates how loop is used to add users to black list as part of execution of “subject7_add_user_to_blacklist” test case in “subject7_samples” folder:

Subject7 Video 15.mp4

62) LOOP_BREAK: Breaks out of the loop before loop is completed.

 More...

Description: This command forces breaking out of the loop before it is completed.
Usage Scenario: Suppose we want to add users to blacklist in our Reference app where the loop is set with increment of 4 and we want to break out of the loop after the first user is blocked.

Procedure: Define steps that lead up to the point where the existing friends list is visible. Define a loop and add your steps that add a user to the blacklist. Before the Loop_End step, add a Loop_Break step. Your steps will look like this:

63) LOOP_END: Ends a loop that has started previously.

 More...

Description: This command is used to end an existing Loop cycle.

Usage Scenario: Suppose we want to end our loop that adds users to the blacklist on Reference app after blocking 4 users in the loop so that once the loop is finished, the next step(s) can start.

Procedure: Once you define your starting Loop step and steps to take action in the loop, add a step with Loop_End command. After that, you can add any steps you like for the test case to execute. Your steps will look like this:

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_add_user_to_blacklist

The following video demonstrates how loop is used to add users to black list and ends once the final count is reached. This is as part of execution of “subject7_add_user_to_blacklist” test case in “subject7_samples” folder:

Subject7 Video 15.mp4

64) MAXIMIZE_BROWSER_WINDOW: allows maximizing the browser window after it was already minimized using Minimize_Browser_Window command.

 More...

Description: This command allows maximizing the browser window after it was already minimized.

Scenario: Suppose we want to maximize the window we moved by 100 in X and 100 in Y as in this article: "MINIMIZE_BROWSER_WINDOW" Command

Procedure:

  1. Define a step with Maximize_Browser_Window in the place where you would like maximization to happen.

  2. Your step will look like this:

65) MINIMIZE_BROWSER_WINDOWallows minimizing the browser window or changing the size of the window using pixels. The X and Y fields determine the position to move where X is for the right and left movements and Y is for up and down movements. You can use positive numbers to move the window from the left to the right in X or top to bottom in Y. You can use negative numbers to move right to left in X or bottom to top in Y. The default value is 0 for Y and 0 for X. Width and Height determine the size of the window in pixels.

 More...

Description: This command allows minimizing the browser window or changing the size of the window using pixels. The X and Y fields determine the position to move where X is for the right and left movements and Y is for up and down movements. You can use positive numbers to move the window from the left to the right in X or top to bottom in Y. You can use negative numbers to move right to left in X or bottom to top in Y. The default value is 0 for Y and 0 for X. Width and Height determine the size of the window in pixels.

Scenario (1): Suppose we want to maximize the browser by 100 points from left to right and 100 points from top to bottom.

Procedure:

  1. Define a step that navigates to a site by opening a window.

  2. Define a step with Minimize_Browser_Window command, select Set position checkbox and add 100 in X and Y fields

  3. Run your test case to see how the position of the window changes. Your steps will look like this:

Scenario (2): Suppose we want to change the browser size to 1366x768 pixels at run time.

Procedure:

  1. Define a step that navigates to a site by opening a window.

  2. Define a step with Minimize_Browser_Window command, select Set size checkbox and add 1366 in Width and 768 in Height fields

  3. Run your test case to verify that the browser size changes

66) MOBILE_DOUBLE_TAP: Need a native mobile license to view/use this command. Double taps on a native mobile widget. Duration is the the amount of time in milliseconds to hold the tap.

 More...

Description: This command is used to double tap on a mobile element.

Usage Scenario: Suppose we want to double tap “1” digit on the Calculator app

Procedure:

1- Define a step that launches the Calculator app. For example, this will be the Mobile_Run_App step:

2- Define a step with Mobile_Double_Tap command to double tap on “1” digit.

67) MOBILE_FILL: Need a native mobile license to view/use this command. Fills "value" in a text field or a text area identified by "Locator" field. If "clear" is checked, it will clear the text field or the text area before filling it out otherwise it will append it to whatever is already included in the text field or text area. This command further allows encryption of the data in the wizard itself instead of having to create a data template to achieve it. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the value field. A list of variables will appear for you to select from.

 More...

Description: This command is used to fill a value in a text field identified by a locator.

Usage Scenario: Suppose we want to search on Wikipedia for the term “Google”.

Procedure:

1- Prepare steps that run the app and tap the “Search Wikipedia” box as in "MOBILE_TAP" Command

2- After that, create a step with Mobile_Fill command that will tap on Search textfield highlighted below:

2- Your step will look like this:

3- Once executed, the app will display the result after typing Google in the textfield:

68) MOBILE_LOAD_APP: Need a native mobile license to view/use this command. Loads the app either on an emulator (Phone or Tablet) or a real device (Real Device) using URL or File. Reset option will allow resetting the mobile app after the load otherwise it will resume from the last screen left off. Command also accepts suppressing or un-suppressing of the keyboard as a parameter mainly for real devices.

 More...

Description: This command is used to load the app on an emulator or a real device using URL or file uploaded through Repository > File Uploads. Reset option will allow resetting the mobile app after the load otherwise it will resume from the last screen left off.

Usage Scenario: Suppose we want to load Wikipedia app.

Procedure: Create a step with Mobile_Load_App command and upload the installation file or enter a URL of a previously uploaded file for Dropbox in the Application URL field. Your step will look like this:

During execution, Wikipedia app will be installed and opened for you to build your next steps:

69) MOBILE_LONG_PRESS: Need a native mobile license to view/use this command. Long presses on a mobile widget. Duration specifies the hold time for press action.

 More...

Description: This command is used to long-press on a mobile widget. Duration specifies the hold time for press action.

Usage Scenario: Suppose we want to long press the Voice Search button on Wikipedia app for 4 seconds which should display “Search Wikipedia” tooltip.

Procedure:

1- Define steps that launch the application

2- Define a step with Mobile_Long_Press command and create a new locator for Voice Search button

3- Define your duration to be 4000 milliseconds = 4 seconds.

4- Your step will look like this:

70) MOBILE_PINCH: Need a native mobile license to view/use this command. Performs the pinch operation on the mobile widget. Offset specifies the distance to hold the pinch.

 More...

Description: This command is used to perform pinch operation on a mobile widget. To zoom out, you can add a number the Offset (points) field.

Usage Scenario: Suppose we want to zoom out on the Google maps app.

Procedure: Prepare steps that run the app and create a step with Mobile_Pinch command with 50 offset points. For the mobile locator ID, you can the value below. Your steps will look like this:

com.google.android.apps.maps:id/map_frame

This is how Google Maps app will look like before running Mobile_Pinch command (map is already zoomed in)

This is how Google Maps app will look like after running Mobile_Pinch command with 50 offset points (map gets zoomed out)

71) MOBILE_PRESS: Need a native mobile license to view/use this command. Performs the press operation on the mobile widget.

 More...

Description: This command is used to press on a mobile widget.

Usage Scenario: Suppose we want to press the Voice Search button on Wikipedia app.

Procedure:

1- Define steps that launch the application

2- Define a step with Mobile_Press command and create a new locator for Voice Search button

3- Your step will look like this:

4- After execution, the Voice Search button will be pressed

72) MOBILE_PRINT_PAGE_SOURCE: Need a native mobile license to view/use this command. Prints the code behind the current mobile page to the screen/report. A copy icon is available to help you copy even large sources from the Message field. 

 More...

Description: This command is used to get the source code of the html page being opened.

Usage Scenario: Suppose we want to get the source code of an open page on Google Chrome.

Procedure: Define a step that runs Google Chrome and define another step with Mobile_Print_Page_Source command to retrieve the source code. Your step will look like this:

After clicking more.., you can click Page Source which will open the source code on a separate page for you to read/copy.

73) MOBILE_RUN_APP: Need a native mobile license to view/use this command. Runs the app either on an emulator (Phone or Tablet) or an iOS real device (iOS Real Device) using URL or File. Reset option will allow resetting the mobile app after the load otherwise it will resume from the last screen left off. "Show connected devices" on the wizard of this command will show the available iOS or Android devices.

 More...

Description: This command is used to open an app which is already installed on the emulator or real device

Usage Scenario: Suppose we want to open Wikipedia app.

Procedure:

1- Create a step with Mobile_Run_App command

2- Enter the Android App Package Name or iOS App Bundle ID

3- Enter App Launch Activity Name which is required for Android

Your step will look like this for launching Wikipedia app using Android emulator:

Once executed on Android emulator, the app will open as below:

74) MOBILE_SCROLL:  Need a native mobile license to view/use this command. Scrolls up or down. Command can also scroll to a specific mobile element.

 More...

Description: This command is used to scroll to a direction of UP or Down or scroll to a specific element defined by a mobile locator.

Usage Scenario: Suppose we want to search for “Gas stations” on Google Maps and then scroll down, then scroll up.

Procedure: Define steps that run the the app, click Search, enter “Gas stations” in the text box and two steps with Mobile_Scroll command.

Your steps will look like this:

Before scrolling, Google apps will look like this:

After scrolling down, Google app will look like this (Notice scroll bar position):

75) MOBILE_SPREAD: Need a native mobile license to view/use this command. Performs the spread operation on the mobile widget. Offset specifies the distance to hold the spread. 

 More...

Description: This command is used to perform spread operation on a mobile widget. To zoom in, you can add a number the Offset (points) field.

Usage Scenario: Suppose we want to zoom in on the Google maps app.

Procedure: Prepare steps that run the app and create a step with Mobile_Spread command with 50 offset points. For the mobile locator ID, you can the value below. Your steps will look like this:

com.google.android.apps.maps:id/map_frame

To launch Google maps, you can use the App Package Name and Activity Name below:

com.google.android.apps.maps
com.google.android.maps.MapsActivity

This is how Google Maps app will look like before running Mobile_Spread command (map is already zoomed out)

 This is how Google Maps app will look like after running Mobile_Spread command with 50 offset points (map gets zoomed in)

 

 

76) MOBILE_SWIPE: Need a native mobile license to view/use this command. Swipes on a scrollable widget in a specified direction (left, right, up, or down) until an element is located. Both scroll and swipe amounts are configurable.

 More...

Description: This command is used to perform swipe operation on a mobile widget using a mobile locator. Swipe to a locator allows you to use an end point for the swipe which is defined in a mobile locator. Direction allows you to control the direction of the swipe (Up, Down, Left, Right) and Offset points allows you to specify the amount of the swipe.

Usage Scenario: Suppose we want to swipe to the left by 450 points on Wikipedia app in the “In the news” section highlighted below:

Procedure: Define steps that run/load Wikipedia app and define a mobile locator for the card list highlighted above. The XPath below was used for the purposes of demonstration in this example:

org.wikipedia:id/view_list_card_list

Your step will look like this:

After swiping to the left, you will notice that the original image was moved to the left to indicate swipe direction by 450 points.

77) MOBILE_TAP: Need a native mobile license to view/use this command. Taps on a native mobile widget. Duration is the the amount of time in milliseconds to hold the tap. Fingers is the number of fingers used. Command is also capable of tapping on Back Android system button.

 More...

Description: This command is used to tap on a mobile widget identified by a locator or click on a System Button for Android.

Usage Scenario: Suppose we want to tap on “Search Wikipedia” search box on Wikipedia app to start a search.

Procedure:

1- Create a step with Mobile_Tap command

2- Create a locator to tap on the Search icon highlighted below:

3- Your step will look like this:

4- Once executed, the “Search Wikipedia” box will be tapped and the Search textfield will appear in order to be used:

78) MOBILE_UNLOAD_APP: Need a native mobile license to view/use this command. Unload app from the emulator or the actual device in use. "Remove app" option on the wizard can be used to remove the app from the mobile device.

 More...

Description: This command is used to unload the app on an emulator which was previously started using Mobile_Run_App or Mobile_Load_App. “Remove App” option can be used to remove an app installed using Mobile_Load_App command.

Usage Scenario: Suppose we want to unload Wikipedia app and remove it.

Procedure: At the end of your test case, add a step with Mobile_Unload_App command and check “Remove App”. Your step will look like this:

79) MOBILE_VERIFY_ELEMENT: Need a native mobile license to view/use this command. Verifies existence or non-existence of a mobile element on the screen."Check disabled" option checks for disabled or enabled elements, verification will be done "Attempts" number of times with "Interval" seconds in between each verification. As soon as the element to verify becomes available, the verification will be performed. Attempts and Interval options are used mainly if rendering of the element is asynchronous.

 More...

Description: This command is used to verify the existence or non-existence of a mobile element on screen. Check disabled" option checks for disabled or enabled elements, verification will be done "Attempts" number of times with "Interval" seconds in between each verification will be performed. Attempts and Interval options are used mainly if rendering of the element is asynchronous.

Usage Scenario: Suppose we want to verify that “Picture of the day” text appears as highlighted below:

Procedure:

1- Define steps that launch the application

2- Define a step with Mobile_Verify_Element, create a locator for “Picture of the day” and use the locator in your command options.

3- Make sure that “Exist” checkbox is checked

4- Your step will look like this:

80) MODIFY_LIST: Allows modifying a list which was previously created using Set_List command. In the List Variable field, enter '@' to select the list variable generated in Set_List step, then select an action from the drop-down list. Add_Column: allows you to set a column with or without a custom name. Add_Row: allows you to add a row under a column. Modify_Value: allows you to modify a value for a row by entering its name and index number

81) MULTI_ACTION: Supports combination of keys such as CTRL, ALT, etc as well as Selenium action commands.

 More...

Description: This command allows using various multiple functions such as drag and drop, click and hold, release etc as well as Selenium action commands.

Usage Scenarios:

1- Suppose we want to use Send_Keys to pass the username and password to Reference app and login afterwards.

Procedure: Define steps that navigate to our Reference app and click Login link. Then define a step with this command. Define the locators and enter/inject the values. Your step will look like this:

2- Suppose we want to add more options to the above example by waiting for 3 seconds after the email address is filled and navigate using keyboard to the Password field without using a locator.

Procedure:

  • In your step with Multi_action command, define a step with Send_Keys, use the locator for the email address field and enter/inject the email address.

  • Click + to add another action, select Pause and enter 3 seconds.

  • Click + to add another action, select Send_Keyboard_key and select Tab from the dropdown list.

  • Click + to add the final action, select Send_Keys and enter/inject the password.

Your step will look like this:

82) NORMALIZE_SPACE: removes extra white spaces from a given text specified by "Message" field which could be a hard-coded-value or a variable. Result of the command is stored into "variable name". In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the Message field. A list of variables will appear for you to select from.

 More...

Description: This command removes unnecessary spaces in a text and stores the value in a variable.
Usage Scenario: Suppose we want to write "This a Subject7 test" in the Email field, normalize the spaces and then type it again.

Procedure: Define the below steps:
A- step to navigate to Reference app
B- Step to click Login link
C- Step to fill Email field with value "This a Subject7 test"
D- Step which retrieves the value from Email field and stores it in a variable
E- Step which normalizes space from variable value in step D and stores it in different variable
F- Step which clears Email field and enters new value with normal spaces

Your steps will look like this:

83) PASSIVE_WEB_SECURITY_CHECKNeed a Web Security Testing license to use this command. Performs passive scanning on all HTTP messages (requests and responses) sent to the web application being tested without making any changes to these requests and responses. This command requires ZAP installation on your device for local runs to work.

 More...

Description: This feature is only available for customers who have a license. Performs passive scanning on all HTTP messages (requests and responses) sent to the web application being tested without making any changes to these requests and responses. This command requires ZAP installation on your device for local runs to work.

Usage Scenario: Suppose we want to run passive scan on our Reference app.

Procedure: 1. Install OWASP ZAP for a local run and use this command in your step to perform the scan.

2. Follow the instructions in Dynamic Security Testing

84) PING: Performs a ping to a host (by entering the IP address) to confirm if it's reachable or not. The result is displayed in the Message field with average/packet loss/min/max.

 More...

Description: This command pings an IP address and provides the result in the message field with (average/packet loss/min/max).

Usage Scenario: Suppose you have the IP address (216.58.213.110) 3 times to check if it is reachable.

Procedure: Define your step and enter the IP address (216.58.213.110) in the IP field. You can also define the number of times to ping the IP address in the field Times. Your step will look like this:

85) PRINT_PAGE_SOURCE: Prints the HTML behind the current page to the screen/report. 

 More...

Description: This command copies the HTML source code of the opened page and provides it in the message field.
Usage Scenario: Suppose we want to copy the source code of Reference app.

Procedure: Define a step that navigates to the site and another step that copies the source code. Your steps will look like this:

86) RESET_SSL_SETTINGS: Allows to clear or reset an SSL Certificate.

87) RIGHT_CLICK: Right clicks on a widget identified by a web locator or inline XPath

 More...

Description: This command right clicks on a web element identified by a web locator or inline XPath to bring up a context menu.
Usage Scenario: Suppose we want to right click on the Login link on Reference app.

Procedure: Define a step to navigate to the site and another step that right clicks on Login link with XPath (//a[contains(text(),'LOGIN')]). Your steps will look like this:

Web Locator:

Inline XPath:

88) SCREEN_SHOT: Allows taking a screenshot of the entire VM, entire browser or a specific widget.

 More...

escription: This command takes a screenshot of a locator, browser or the entire screen and stores it in a variable.

Usage Scenario: Suppose we want to take a screenshot of the Communities list on our Reference app.

Procedure: Define steps that lead up to the Communities page and define your step with Screen_Shot command. Set the command type to be “Browser” which will take a screenshot of the browser. Your step will look like this:

image-20240223-115158.png

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_existing_communities_screenshot

The video following video demonstrates how two screenshots are taken from the browser and saved variables as part of execution of “subject7_existing_communities_screenshot” test case in “subject7_samples” folder:

screenshot.mp4

89) SCROLL_TO: Scrolls to a specific element/locator on the screen.

 More...

Description: This command scrolls to a specific element on screen defined by a locator.

Usage Scenario: Suppose we want to scroll to the Reference app footer.

Procedure: Define a locator for the footer. The HTML tag of the footer is:

<p class="text-muted pull-right" style="">Social Network 1.0.0.95 Last Updated 2020-04-07_09-04 | Copyright © 2020 Subject7 Inc</p>

and the XPath is

//p[contains(text(),'Social Network')]

Then select the locator in your command options. Your step will look like this:

Web Locator:

image-20240223-120353.png

Inline XPath:

image-20240223-120424.png

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_existing_communities_screenshot

The video following video demonstrates how scrolling takes place to reach the Social Network footer as part of execution of “subject7_existing_communities_screenshot” test case in “subject7_samples” folder:

Subject7 Video 4.mp4

90) SCROLL_TO_DYNAMIC: Takes a scrollable element/locator, direction of scroll (left, right, up, or down) along with a text or a locator. It will scroll the scrollable element to the direction specified until it finds the text or locator unless it reaches the end of the scrollable area in which case the command fails.

 More...

Description: This command takes a scrollable element/locator, direction of scroll (left, right, up, or down) along with a text or a locator. It will scroll the scrollable element to the direction specified until it finds the text or locator unless it reaches the end of the scrollable area.


Usage Scenario: Suppose we want to the footer of Reference app after opening Profiles page.

Procedure: Define steps that navigate to Reference, opens the Profiles page and scrolls to the footer. Your step will look like this:

image-20240223-120856.png

91) SELECT: Selects from a drop down by index, value, or visible text. You can alternatively deselect a value or deselect all values.

 More...

image-20240223-115317.png Description: This command selects a value from a drop-down list defined by a locator or inline XPath using an index, value, etc.
Usage Scenario: Suppose we want to create a new community and select the type of the community to be “OPEN”.

Procedure: Define your locator or use inline XPath for the drop-down list where the HTML Tag is

<select class="form-control ng-pristine ng-valid ng-empty ng-touched" ng-model="ctrl.community.type" style=""><option value="? undefined:undefined ?"></option>
                <option value="OPEN">OPEN</option>
                <option value="CLOSED">CLOSED</option>
            </select>

and the XPath is

//label[contains(@for, 'type')]/ancestor::div/descendant::select

and select “By_Value” as the type. Then enter the Value “OPEN”. Your step will look like this:

Web Locator:

image-20240223-115320.png

Inline XPath:

image-20240223-115353.png

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_new_community_and_delete_community

The video following video demonstrates how a value (OPEN) is selected when a Community is created as part of execution of “subject7_new_community_and_delete_community” test case in “subject7_samples” folder:

select.mp4

92) SET_DATE: Assigns a date with a specific format to a variable. Results will be assigned to "Variable name", "Source" can be @system.date for the current date and time or another date variable, "Source Format" is the format of the source date, "Target Format" is the format of the resulting date, "Offset" is the addition or subtraction made to the source date.Values for offset could be +/- a number in addition to y for years, M for months, d for days, H for hours, m for minutes, s for seconds. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in any of the fields. A list of variables will appear for you to select from.

 More...

Description: This command generates a date/time with a format you specify and stores it in a variable
Usage Scenario: Suppose we want to add a date and time in Resume field to indicate when the profile was last updated.

Procedure: Define your Set_Date step, enter a variable name and specify your format "yyyy-MM-dd - hh:mm:ss". Define another step with Fill command and define a locator for Resume field. Once finished, use the variable in your Fill command. Your steps will look like this:

Set_Date step:

image-20240223-115806.png

Fill Step:

image-20240223-115837.png

See the Test Library path: subject7_samples/subject7_advanced_suite/subject7_modify_profile_information

The video following video demonstrates how a date/time is generated from the system as well as a comparison between two dates/times as part of execution of “subject7_modify_profile_information” test case in “subject7_samples” folder. Note that the profile page does not show any date/time added, so one was added as a simulation for the purpose of the video.

Subject7 Video 6.mp4

93) SET_GLOBAL_VAR: Creates a global variable and assigns the value to a variable name. Global variables can be used across multiple test cases and can be leveraged in different execution sets/load tests. To retrieve the value of this variable and use it somewhere else, refer to command GET_GLOBAL_VAREncrypted checkbox allows you to encrypt and mask the value from appearing in logs or Variables window.

94) SET_LIST: Allows reading all the values of data sets associated with a given data template, an SQL command, or an XLS/CSV file/URL. This command creates an array of these values and loop command will allow you to loop through all of them. Once an array is defined using this command, @array_name.rowsCount and @array_name.columnsCount will provide the row count and column count respectively. In order to read the individual array items the following syntax can be used: @{array_name.field_name}[@i] where “i” is the loop variable. This command can also split a string/text using different splitter parameters (Space, Semicolon, Comma) or by using a regular expressions (RegEx). This command also has the ability to create an empty list that you can modify using Modify_List command. The limit for the number of columns and rows in the file is set to 100 by default. To allow users to use a higher number of columns/rows in the list, admins have the ability to change the default value using admin panel. If the command is used with data sets, the maximum limit of rows/columns is 1000x50, but users can upload much more with XLS/CSV as a source type.

 More...

Description: This command is used to generate a 2-dimensional list of data from a data set, a CSV file, an XLS file, or an SQL data base. It is also capable of splitting a string into parts and creating an empty list.

  • The + icon in Advanced Filters allows you to add “Include” or “Exclude” rules which work by Name or Owner. You can use these rules to include or exclude certain data from appearing on your list.

  • The “Use '1' as column and row starting index” can be used if you would like to reference the fields starting from column and row number 1, otherwise the default will be 0.

The preview list button allows you to view your list (for Data Sets source type) before executing your test case. For other sources, you can run your test and click … in the Variables pane on the right.

Usage Scenarios:

Row

Email

Password

0

Email1@gmail.com

Password1

1

Email2@gmail.com

Password2

2

Email3@gmail.com

Password3

3

Email4@gmail.com

Password4

4

Email5@gmail.com

Password5

(Scenario 1) Using the table above, suppose we want to fill the values from Row 3 / Column 2 = “Email3@gmail.com” in the Email address text box on Reference app.

Procedure:

A- Create a data template and copy the data from the table above into data sets. After that, create an automated test case and use Set_List command to generate the list from the data set.

B- Create steps that navigate to Reference app and click on the Login link.

C- In the Fill step, define a locator for the Email address text box. In the Value field, use the formula below.

@list_variable[row.number][column.number]

Your steps should look like this:

The video below shows the steps in this scenario:


(Scenario 2) Suppose we want to loop through all values from the table into the Email address text box on Reference app.

Procedure:

A- Create an automated test case and use Set_List command to generate the list from the data set.

B- Create steps that navigate to Reference app and click on the Login link.

C- Add a Loop step with the following parameters:

Start 0
End   @list_variable.rowsCount-1
Step  1

NOTE: list_variable is the variable defined in step A.

NOTE: “rowsCount-1” will take existing data from rows

D- Add another loop step with the following parameters:

Start 0
End   @list_variable.columnsCount-1
Step   1

NOTE: list_variable is the variable defined in step A

NOTE: “columnsCount-1” will take existing data from columns

E- Add a Fill step that fills the formula below into the Email address text box. For easier readability, add a space after this line or a slash or any character your like.

@list_variable[@rows_variable][@columns_variable]

F- Add two Loop_End steps to finish the loop. Your steps will look like this:

The video below shows the steps in this scenario:


(Scenario 3) Suppose we want to loop through all rows from Email column and fill the values into the Email address text box on Reference app.

Procedure:

A- Create an automated test case and use Set_List command to generate the list from the data set.

B- Create steps that navigate to Reference app and click on the Login link.

C- Add a Loop step with the following parameters:

Start 0
End   @list_variable.rowsCount-1
Sep   1

NOTE: list_variable is the variable defined in step A

NOTE: “rowsCount-1” will take data from existing rows

D- Add a Fill step that fills the formula below into the Email address text box. For easier readability, add a space after this line or a slash or any character your like.

@{list_variable.column_name}[@rows_variable]

E- Add a Loop_End steps to finish the loop. Your steps will look like this:

The video below shows the steps in this scenario:


(Scenario 4) Suppose we want to retrieve a list of names from a post on Reference app and split this string into parts.

Procedure:

A- Create an automated test case and add steps that navigate and log into Reference app.

B- Create a step that retrieves the text of the post using Get_Web_Value command and assigns it to a variable name. If the post is not existent, you can create one and define a locator using XPath. For example, the names you can use are:

Henry,James,Thomas,Michael,Tim,Jim,Daniel,Scott

C- In a new step, use Set_List command and select Split String as Source Type.

D- In the Text to split filed, enter the variable from step B preceded by @.

E- In the Splitters field, select the appropriate type and character. If the above example is used, we must check Comma field.

F- Your steps will look like this. Run the test to see how it will retrieve the string and split it into parts.


(Scenario 5) Suppose we have data in a database that we want to retrieve and loop through them using the query:

SELECT * FROM @table_name;

Procedure: Define a step with Set_List to generate the list from the SQL database. Once finished, define steps to navigate to Reference, loop steps and a step that fills the data from the loop into the Email address field. Your steps will look like this:

Loop steps details:


Scenario (6): Suppose we want to create an empty list and add 1 column and row, then add 2 users to it.

Procedure: Define a step with Set_List and select Empty. Then using Modify_List command, you can start adding columns and rows and modifying them accordingly.

Step Order:

1- Set_List HALT list EMPTY Creates an empty list

2- Modify_List HALT @list ADD_COLUMN Adds a new column to the list

3- Modify_List HALT @list ADD_ROW Adds a new row to the list

4- Modify_List HALT @list MODIFY_VALUE Modifies existing Row/Column by adding value

5- Modify_List HALT @list ADD_ROW Adds a new row to the list

6- Modify_List HALT @list MODIFY_VALUE Modifies new Row by adding value

95) SET_SSL_SETTINGS: Allows to set an SSL Certificate before a SOAP or REST service is called.

96) SET_TIMEOUTS: Allows default values for page timeout, locator timeout or runtime speed to be modified with "Manual" option for Web, Mobile and Desktop commands. In order to go back to default values set either in local or cloud runs, use "Default" option. It can also be used for native mobile.

 More...

Description: This command allows default values for page timeout, locator timeout or Runtime Speed to be modified with "Manual" option for Web, Mobile and Desktop commands. In order to go back to default values set either in local or cloud runs, use "Default" option.

Usage Scenario: Suppose we want to navigate to Reference app and click a button which is not visible (so that full 5 second locator timeout period is reached) and change locator timeout to 10 seconds and click the button again so we can see the duration of each click step.

Procedure: Define your click step and enter locator timeout as 5 seconds in Manual option. Change the click steps to "Continue on failure" so that your execution will continue running. Your steps will look like this:

Sample SLL Snippet (Click Advanced View on your test and paste on Commands Editor tab)

WEB GOTO_URL "https://reference.subject-7.com" HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_general.button.login_button CONTINUE_WARN ON ERROR 
SET_TIMEOUTS MANUAL WEB LOCATOR_TIMEOUT 10 PAGE_TIMEOUT 30 RUNTIME_SPEED 200 HALT ON ERROR 
WEB CLICK TARGET LOCATOR subject7_reference_general.button.login_button CONTINUE_WARN ON ERROR

97) SET_VAR: Creates a variable. Options are:

  • Static: a hard coded value or a data template value. Example: SET_VAR STATIC var1 "12" for a hard-coded-value or SET_VAR TEMPLATE var2 ${test_template.field1} for a data template value.
  • Random: a random value of a specific length using a specific set of alphabet. Alphabet could be defined by a series of characters or regular expressions (RegEx).
  • Expression: a value resulting from arithmetic operations. Example: such as @var1+@var2-5 (where var1 and var2 are different variables defined prior to this command). The command further allows creation of variables of a specific format using regular expressions.
  • Pattern: a value following a regular expression (RegEx) pattern.
 More...

Description: This command creates a variable using the type: static, random, expression or pattern and stores it in the variable name.

Usage Scenario: Suppose we want to set a value for a password to be saved in a variable so we can use this password to register on Reference app.

Procedure: Define your step and use Static as Source Type with variable name “password”. Then enter your value or inject it using a data template. Your step will look like this:
Set_Var step:

Fill step that uses the value from this variable:

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_website_registration_hardcoded

The following video demonstrates how a value was saved in a variable under Set_Var step and used in “Password” and “Password Confirmation” fields as part of execution of “subject7_website_registration_hardcoded” test case in “subject7_samples” folder:

Subject7 Video 18.mp4

98) Submit: Submits an HTML form.

 More...

Description: This command submits an HTML form.
Usage Scenario: Suppose we want to navigate to a site and then submit an HTML form there. Your steps will look like this:
Procedure: Define a step to navigate to the site and another step that submits the form. Your steps will look like this:

99) SUB_STRING: extracts a portion of a given variable or text identified by "Message" into another variable identified by "Variable name" using starting and ending indices. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the Message field. A list of variables will appear for you to select from.

 More...

Description: This command extracts a portion of a given variable or text identified by "Message" into another variable identified by "Variable name" using starting and ending indices.

Usage Scenario: Suppose we want to use only the first 15 characters of the footer value.

Procedure: Define a step that navigates to our Reference app and a step that uses Get_Web_Value to retrieve the footer value. The final step will use Sub_String with character index from 1 to 15. Your steps will look like this:

 References...

100) SWITCH_FRAME: Explicitly switches to a frame/iframe identified by id, name, xpath, or "Main" window (first window launched by the test case). Please note that Locator-based commands will switch frame to the Locator-defined frame. Use this command to switch frame for commands like EXECUTE_JAVASCRIPT. This command has been added for scripts using Snippets and/or JavaScript. This command supports Switch Duration parameter to override the default behavior of locator-based elements. Without using this parameter, the locator-based commands will switch frame to the frame defined by the locator. If the whole test case option is used for this new parameter, the locator-based commands will not switch to the frame defined by the locator but instead will continue using the frame from this command throughout the rest of the test case or until another Switch_frame command is issued with the Default option.

 More...

Description: This command switches to a frame/iframe identified by id, name, XPath or “Main” window and is commonly used with script commands such as Execute_Javascript.

Usage Scenario: Suppose we have a JavaScript code that we need to run but the elements are located in frames.

Procedure: Define your switch frame step before the Execute_Javascript step and add the step for Switch_Frame using the type needed. Your steps will look like this:

101) SWITCH_WINDOW: Explicitly switches to another window identified by a unique popup text, handle index (0,1,2) or main window. Please note that Locator-based commands will switch window to the Locator-defined window. Use this command to switch window for commands like EXECUTE_JAVASCRIPT or with popups that are automatically displayed. Switch Duration parameter is used to override the default behavior of locator-based elements. Without using this parameter, the locator-based commands will switch window to the windows defined by the locator. If the whole test case option is used for this new parameter, the locator-based commands will not switch to the window defined by the locator but instead will continue using the window from this command throughout the rest of the test case or until another Switch_Window command is issued with the Default option. To guarantee switching to a specific window, after you navigate to that window, create a step with Switch_Window command, select Handler Index and use the number to assign the window with this number (number must not be more than the number of open windows).

 More...

Description: This command switches to another window identified by a unique popup text, handle index (0,1,2) or main window. Please note that Locator-based commands will switch window to the Locator-defined window. Use this command to switch window for commands like EXECUTE_JAVASCRIPT or with popups that are automatically displayed. Switch Duration parameter is used to override the default behavior of locator-based elements. Without using this parameter, the locator-based commands will switch window to the windows defined by the locator. If the whole test case option is used for this new parameter, the locator-based commands will not switch to the window defined by the locator but instead will continue using the window from this command throughout the rest of the test case or until another Switch_Window command is issued with the Default option.

To guarantee switching to a specific window, after you navigate to that window, create a step with Switch_Window command, select Handler Index and use the number to assign the window with this number (number must not be more than the number of open windows).

Usage Scenario: Suppose we want to open Reference app on 3 windows and switch from the 3rd window to the second and then to the main window.

Procedure: 1. Define a Goto_URL step as your starting point and two steps with Execute_Javascript for the navigation of the second and third windows using the code:

window.open("https://reference.subject-7.com");

2. After each navigation step, add a step with Switch_Window command, select Handle Index option and enter the number to assign the windows. For example, the first tab will be 0, the second tab will be 1 and the third tab will be 2.

3. At the end, add 3 steps with Switch_Window command which will perform the actual switching between tabs to make sure that the numbers assigned are correct. Your steps will look like this:

102) VERIFY_ELEMENT: Verifies existence or non-existence of an element on the screen. "Check invisible" option checks for invisible or visible elements, "Check disabled" option checks for disabled or enabled elements, verification will be done "Attempts" number of times with "Interval" seconds in between each verification. As soon as the element to verify becomes available, the verification will be performed. Attempts and Interval options are used mainly if rendering of the element is asynchronous.

 More...

Description: This command verifies the existence or non-existence of an element on screen defined by a locator or inline XPath. It also allows modifying the number of attempts and the seconds between attempts, in addition to checking disabled or invisible elements.

Usage Scenario: Suppose we want to verify that the user no longer has friends after adding them all to the blacklist by checking if the paragraph with text “'The user does not have any friends” is visible.

Procedure: Define your locator with reference name “reference_friends.text.no_friends” or use inline XPath where the HTML tag is

<p class="lead ng-scope" ng-show="ctrl.getUsers().data.content.length === 0 || !ctrl.getUsers()">
                                The user does not have any friends.</p>

and the XPath is

//p[contains(text(),'The user does not have any friends')]

Then use the locator or inline XPath in your step and make sure that “Exist” is checked. Your step will look like this:

Web Locator:

Inline XPath:

See the Test LIbrary path: subject7_samples/subject7_advanced_suite/subject7_add_user_to_blacklist

The video following video demonstrates how the paragraph element “The user does not have any friends” is verified to be present after adding all users to the blacklist as part of execution of “subject7_add_user_to_blacklist” test case in “subject7_samples” folder:

Subject7 Video 19.mp4

103) VERIFY_FILE_DOWNLOAD: Checks to see whether a specific file is downloaded to a particular location and whether this file has a valid file type or not. This command can also be used to delete the ifle once verification is complete. You can use the "Time out before verification" option to control the command timeout before the verification starts. Verification options include Normal, ANT, REGEX, and WILDCARD. The directory can be injected in a data template and a data set. This Command allows using wildcards (i.e. *) in the Base Dir field.

 More...

Description: This command checks to see whether a specific file is downloaded to a particular file location and it has the option of deleting it after downloading and verifying. The option “Validate file” allows validating that the file is correct.

Usage Scenario: Suppose we want to download a file and wait 10 seconds for the download to finish. Then verify that it was downloaded. If your file is downloaded directly in Downloads folder (C:\Users\USERNAME\Downloads), you can use your own user for local runs, but for cloud executions on SaaS installations, the username is ‘xpoint’.

Procedure: Define your step and uncheck "Delete file after check". Set your timeout to needed time (10 seconds for example) and enter the path of the file where it will be downloaded (C:\Users\username\Downloads). Your step will look like this:

104) VERIFY_REST: Makes a call to a REST end-point for verification purposes. As part of this command, the returned JSON can be validated by selecting "Validate" and supplying a RAML file. The HTTP response code will be assigned to "Status variable name". Values to be verified whether XML or JSON can be added to the "Value" fields. The command allows checking of multiple value pairs in the REST response. If all but a few of the value pairs are successful, the return message points out the few value pairs that are failing the check. "Contains", "Count", "Equals" and "Not_Equals" are available for this command to support arrays. This command keeps the response status to be used in testing logic afterwards. This command supports JSON paths. Templates can be injected in this command into key value pairs. Also, the order of key-value pairs is preserved. Web service response can be read and copied after this command is executed. 

 More...

Description: This command makes a call to a REST end-point for verification purposes.

Usage Scenario: Suppose we want to get a profile using its ID and verify if the returned profile has an email address that matches "tsmith@subject-7.com".

Procedure: Define your step with a REST connection and in the Value section, add the JSON key and value that will be compared. Your steps will look like this:

105) VERIFY_SOAPMakes a call to a SOAP web service for values that can be then verified. This command allows the checking of multiple value pairs in the REST response. If all but a few of the value pairs are successful, the return message points out the few value pairs that are failing the check. Templates can be injected in this command into expressions pairs. Web service response can be read/copied/downloaded after this command is executed.

 More...

Description: This command makes a call to a SOAP end-point for verification purposes using the parameters: Exists, Not_Exists, Equals, Not_Equals or Count.

Your step will look like this:

106) VERIFY_TEXT: Verifies existence or non-existence of a text identified by "Value" on the screen. If the text to verify is inside a frame "Target Frame" should be used. If the text to verify is inside another window/popup, a text to uniquely identify that window should be used in "Target Window". Verification will be done "Attempts" number of times with "Interval" seconds in between each verification. As soon as the text to verify becomes available, the verification will be performed. Attempts and Interval options are used mainly if rendering of the text is asynchronous. If used in local player and local player is paused in the middle of the retries, it does not complete the remainder of the tries. Existence type can be selected by Web Page, Dom or both Web Page and Dom. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the Value field. A list of variables will appear for you to select from.

 More...

Description: This command verifies the existence or non-existence of a text on screen identified by Value. It also allows checking through frames, popups or any text element inside a DOM or a web page of a combination of DOM and web page. If the element is in a frame, the frame must be added either to a web locator or using Inline Frame.

Usage Scenario: Suppose we want to verify that the text “Friend Request was Sent” appears on screen after clicking on the “Send Friend Request” button on Reference app.

Procedure: Define your step and set the Value as “Friend Request was Sent” with the Existence Type set as “Web page/DOM”. Your step will look like this:

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_add_friend

The video following video demonstrates when the text “Friend Request was Sent” is verified to exist on the page after adding a friend as part of execution of “subject7_add_friend” test case in “subject7_samples” folder:

Subject7 Video 20.mp4

107) VERIFY_TEXT_IN_ALERT: Verifies existence or non-existence of a text in an alert box. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the Value field. A list of variables will appear for you to select from.

 More...

Description: This command verifies existence or non-existence of a text in an alert box.

Usage Scenario: Suppose we have an alert that displays a message and we want to verify that it does not say "Failed to find results" and instead show the result below:

Procedure: Define your step and add "Failed to find results" as a Value and uncheck "Exists". Your step will look like this:

108) VERIFY_TEXT_IN_PDF: Verifies existence or non-existence of a text identified by "Value" in a PDF document. If the text to verify is inside a frame "Target Frame" should be used. If the text to verify is inside another window/popup, a text to uniquely identify that window should be used in "Target Window". Verification will be done by "Attempts" number of times with "Interval" seconds in between each verification. As soon as the text to verify becomes available, the verification will be performed. Attempts and Interval options are used mainly if rendering of the text is asynchronous. The command allows "case sensitive" verification of a text where the default verification is case insensitive. You can also use a PDF file that directly downloads to your device instead of opening on your browser. To do so, simply add the path of the download file in a Goto_url step followed by the file name and extension. For example, "C:\Users\username\Downloads\file.pdf". The next step will verify the text in PDF which is opened. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the Value field. A list of variables will appear for you to select from

 More...

Description: This command verifies existence or non-existence of a text identified by "Value" in a PDF document. You can specify a frame or a window in which the PDF file is open. Verification will be done by "Attempts" number of times with "Interval" seconds in between each verification.

Usage Scenarios:

A- Suppose we have a page that opens a PDF file and we want to check that the word "Subject7" exists in that document.

Procedure: Define a step that opens the PDF page and the step with Verify_Text_In_PDF command. Add a value of "Subject7". Your step will look like this:

B- Suppose we have a page that can only download a PDF file in which we need to check the word "Subject7".

Procedure: Define a step that triggers the download of the file and a Goto_URL step with the location of the downloaded file. For example, "C:\Users\username\Downloads\file.pdf". Your steps will look like this:

109) VERIFY_XML: Verifies that the XPath (In command options) exists or does not exist in the SOAP response. Verification will be done by "Attempts" number of times with "Interval" seconds in between each verification

 More...

Description: This command verifies that the XPath (In command options) exists or does not exist in the SOAP response. Your step will look like this:

110) WAIT: Waits for a specified number of seconds.

 More...

Description: This command waits for an amount of time specified by seconds.

Usage Scenario: Suppose we want to wait before verifying that logging in was successful on our Reference app as the app takes approximately 2 seconds after logging in.

Procedure: Define your Wait step after the step that clicks Login button and set the period to be 2 seconds. Your step will look like this:

See the Test Library path: subject7_samples/subject7_basic_suite/subject7_website_login_logout

The video following video demonstrates how Wait step is executed after logging into Reference App as part of “subject7_website_login_logout” test case in “subject7_samples” folder:

Subject7 Video.mp4

111) WRITE: has two options

  • Writes/Echoes a message or a list to the screen and to the player logs. It can also print the content of a variable into the screen/logs. In case you are using variables, you can use show any available variables that you set in your test case by entering "@" in the Message field. A list of variables will appear for you to select from.
  • Writes a message or a list to a CSV file and provides a URL that you can use to download the file or copy the URL for your convenience. You can also select From and To in order to determine specific rows to include in the file (Start to End / Index # to Index #). The header option can be checked in case the first row in the list you have is a header.
 More...

Description: This command writes a message/list on the screen which is specified in the Messages field and can also be shown in the reports. It can also write a a message/list to a file and provides a URL that you can copy/use to download the file.

Usage Scenario: Suppose we want to write a message once the test case checks visibility of existing friend requests on our Reference app.

Procedure: Define your step and set the message “The user does not have any friend requests” which is written if no friend requests are found in Followers page. Your steps will look like this:

image-20240223-114749.png

See the Test Library path: subject7_samples/subject7_intermediate_suite/subject7_approve_incoming_requests_all_in_one

The video following video demonstrates how a message was printed as part of execution of “subject7_approve_incoming_requests_all_in_one” test case in “subject7_samples” folder. Since the followers list has some requests, allowing the test to continue would skip the Print step, therefore Decline All was clicked in order to skip the first part of the statement and execute the Print step.

write.mp4