Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Qualitia has created new actions that enable users to execute test cases on Salesforce Lightning and Classic pages. The new actions help in identifying SFDC specific objects based on labels as they appear on the screen  and reducing the maintenance of test cases.

Table of Contents

SFDC.WaitForLabel

You can use this action to wait for the visibility for the object you want until the specified time lapses. The WaitForLabel action is helpful when a page takes some time to load.

This Action waits until visibility of at least one element with label text.

Parameters:

labelName: A unique object name for which visibility is checked.

maxTimeOutInSeconds: The maximum timeout up to which the script waits for a label to visible in seconds.

Action needs an input of absolute label text for which user wants to wait.

Example: If the label name is ‘Account Name’ , which takes some time to display.

Action

labelName

maxTimeOutInSeconds

WaitForLabel

“Account Name”

”100”

Upon executing this action, the script waits for visibility for at least one element matching with label text up to100 seconds.

This Action searches for all elements matching the label name and it automatically switches to all the iframes within webpage for searching element matching with label text.

SFDC.ClickTab

You can use this action to select an entity in the main menu.

Parameters:

  1. TabName: The Respective tab name you want to select.

Example: -

Action Name

Parameter1

SFDC.ClickTab

“Accounts”

 The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

TabName is empty, null or blank

“Tab Name is Empty”

When script clicks the tab successfully

“Navigated successfully to the tab Accounts”

Tab value specified is not found on the screen or some exception occurred

“Some issue while navigating to the tab Accounts”

“Exception occurred. StackTrace:” respective stack trace will be displayed


SFDC.StandardInputOperation

You can use this action to identify the UI objects as per their label names.  

The SFDC.StandardInputOperation action handles the following six different types of objects:

  • Textbox

  • TextArea

  • Dropdown

  • Lookup

  • Radio Button

  • Checkbox

 Parameters:

  • LabelName: Label of the element as displayed on the screen. Also you can specify type and instance  number.

  • Labelvalue: The Value that must either be selected\entered\entered after clearing

  • TypeofOperation: The operations that can be performed on elements are ‘FillData’, ‘SizeValidations’,  ‘Mandatory Validations’, ‘DetailsVerification’, ‘$StoreText$’, ‘Clear’, $disabled$, ‘ClickNewRecord’, $true$, $false$

The following are types of operations (Refer below to check object type it applies to):

  • FillData: You must use to enter or select a value, select a value, check\uncheck etc.

  • Sizevalidations: You can check the maximum number of characters allowed to enter in text boxes to text area.  

  • Clear: You must use to clear the field value, in which you have an option to enter a new value.

  • DetailsVerification: You can use to verify the value present in the field.

  • $storeText$: You can use to store the value of field.

  • MandatoryValidations: You can use to verify the error message that appears next to the field after clicking the Save button. Also, you can verify whether the field is disabled.  

  • $true$: You can verify if the specified value is present in the lookup drop-down list.

  • $false$: You can verify if the specified value is not present in the lookup drop-down list.

Note: You can use variations for these types of operations that can used are elaborated in below table for different type of UI objects. All operations cannot be used with all different types of UI Objects. 

Salesforce TextBoxes:

Action Name

Parameter1

LabelName

Parameter2

LabelValue

Parameter3

TypeofOperation

SFDC.StandardInputOperation

“Account Name”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name@@textbox ”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name@@textbox@@1”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name@@@@2”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“Text@@100”

“Sizevalidations”

SFDC.StandardInputOperation

“Account Name”

“”

“Clear”

SFDC.StandardInputOperation

“Account Name”

“Apple1”

“Clear”

SFDC.StandardInputOperation

“Account Name”

“Apple1”

“DetailsVerification”

SFDC.StandardInputOperation

“Account Name”

“KeyName”

“$storeText$”

SFDC.StandardInputOperation

“Account Name”

“$SKIP$”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“$disabled$”

“MandatoryValidations”

SFDC.StandardInputOperation

“Account Name”

“Complete this Field”

“MandatoryValidations”

Salesforce Lookups:

Action Name

Parameter1

LabelName

Parameter2

LabelValue

Parameter3

TypeofOperation

SFDC.StandardInputOperation

“Account Name”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name@@@@2”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“”

“Clear”

SFDC.StandardInputOperation

“Account Name”

“KeyName”

“$storeText$”

SFDC.StandardInputOperation

“Account Name”

“$SKIP$”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“New Account”

“CreateNewRecord”

SFDC.StandardInputOperation

“Account Name”

“Complete this Field”

“MandatoryValidations”

SFDC.StandardInputOperation

“Account Name”

“Apple”

“$true$”

SFDC.StandardInputOperation

“Account Name”

“Apple”

“$false$”

 Salesforce Dropdowns:

Action Name

Parameter1

LabelName

Parameter2

LabelValue

Parameter3

TypeofOperation

SFDC.StandardInputOperation

“Account Name”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name@@@@2”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“KeyName”

“$storeText$”

SFDC.StandardInputOperation

“Account Name”

“$SKIP$”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“Complete this Field”

“MandatoryValidations”

 Salesforce CheckBoxes:

Action Name

Parameter1

LabelName

Parameter2

LabelValue

Parameter3

TypeofOperation

SFDC.StandardInputOperation

“Account Name”

“Select”

“FillData”

SFDC.StandardInputOperation

“Account Name@@@@2”

“UnSelect”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“$SKIP$”

“FillData”

 Salesforce List Boxes:

Action Name

Parameter1

LabelName

Parameter2

LabelValue

Parameter3

TypeofOperation

SFDC.StandardInputOperation

“Account Name”

“Apple”

“FillData”

SFDC.StandardInputOperation

“Account Name@@@@2”

“Apple”

“FillData”

 Salesforce Radio Buttons:

Action Name

Parameter1

LabelName

Parameter2

LabelValue

Parameter3

TypeofOperation

SFDC.StandardInputOperation

“Account Name”

“Select”

“FillData”

SFDC.StandardInputOperation

“Account Name”

“$SKIP$”

“FillData”

SFDC.SwitchView

You can use this action to switch the view between lightning and classic views.

Parameters:·        

  • ViewName: You have to specify the respective SFDC view. The parameters values are lightning or classic.

Example: -

Action Name

Parameter1

SFDC.SwitchView

“lightning”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

The ViewName is empty, null or blank

“Status : Failed Message: The ViewName passed is invalid, please verify.”

When the script switches to another view successfully

“Successfully switch to the lightning mode”

When the SFDC application is already in the specified view.

Already in lightning mode

SFDC.ClickButton

You can use this action to click a button as per its name.

Parameters:

  • ButtonName: The respective button name you want to click.

Example: -

Action Name

Parameter1

SFDC.ClickButton

“Save”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

ButtonName is empty, null or blank

“ButtonName Name is Empty”

ButtonName is invalid

“Failed – < ButtonName > – Button Name is invalid”

ButtonName is empty

“Failed – < ButtonName > - Button Name cannot be left empty”

When the script clicks the button successfully

“Button name with the label Save is clicked successfully”

SFDC.ClickAndValidate

You can use this action to verify whether a message is displayed by clicking a button.

Parameters:

  1. ButtonName: The respective button name you want to click.

  2. VerifyMessage: The failure or successful message you want to verify.

Example: -

Action Name

Parameter1

Parameter2

SFDC.ClickAndValidate

“Save”

“Account “Qualitia123” was created successfully”

 The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

ButtonName is empty, null or blank

“ButtonName Name is Empty”

ButtonName is invalid

“Failed – < ButtonName > – Button Name is invalid”

VerifyMessage is empty, null or blank

“Message Name is Empty”

VerifyMessage is invalid

“Failed – < VerifyMessage > – Message is invalid”

When script clicks the button and verifies the message successfully.

“Button name with the label ‘Save’ is clicked successfully and Message is verified successfully”

 

“Expected Message: “Account “Qualitia123” was created successfully” and Actual Message: “Account “Qualitia123” was created successfully” are same”

SFDC.CreateNewEntity

You can use this action to click a specific tab and click its New button.

Parameters:

  • TabName: Respective Tab to be clicked based on label name.

Example: -

Action Name

Parameter1

SFDC. CreateNewEntity

“Accounts”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

TabName is empty, null or blank

“TabName Name is Empty”

TabName is invalid

“Failed – < TabName > – Tab Name is invalid”

When script successful clicks the New Button on the specified tab name.

“Tab name Accounts is selected, and New button is clicked successfully”

Some exception occurred

“Exception while clicking on the tab”

“Exception: respective java exception will be displayed”

“StackTrace:” respective stack trace will be displayed

SFDC.SwitchUser

You can use this action for second level login, which is switching from admin to a different username.

Parameters:

  • UserName: Username to be switched to/login with.

Example: -

Action Name

Parameter1

SFDC. SwitchUser

“Chetan”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

UserName is empty, null or blank

“UserName Name is Empty”

UserName is invalid

“Failed – < UserName > – User Name is invalid”

When script successfully switches to another user

“User Chetan is switched successfully”

When an exception occurs

 “StackTrace:” respective stack trace will be displayed.

“Some error occurred”

SFDC.SelectTabs

You can use this action to click  a Tab from the App screen .

Parameters:

  • TabName: Respective tab name to be selected.

Example: -

Action Name

Parameter1

SFDC.SelectTabs

“Accounts”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

TabName is empty, null or blank

“Tab Name is Empty”

TabName is invalid

“Failed – <tabName> – Tab Name is invalid”

When script successfully navigates to the Tab

“Navigated successfully to the tab Accounts”

When the specified label value is not found on the screen or some exception occurrs

 “Exception occurred. StackTrace:” respective stack trace will be displayed.

SFDC.SortColumnData

You can use this action to sort a table column data in ascending or descending order.

Parameters:

  1. ColumnName: Respective column name to be sorted.

  2. SortOrder: ascending/descending order.

Example: -

Action Name

Parameter1

Parameter2

SFDC.SortColumnData

“Account Name”

“ascending”

 The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

The ColumnName is empty, null or blank

“Status : Failed Message: The Column name passed is invalid, please verify.”

When table column data is empty, null or blank

“Status : Failed Message: The SortOrder passed is invalid, please verify.”

When script successfully navigates to the Tab 

“Data of ‘Column name’ sorted in ascending order”

Column name specified is not found on the screen or some exception occurred

“Exception while clicking on column. Exception: respective java exception will be displayed”

“StackTrace:” respective stack trace will be displayed

SFDC.SearchAndStoreRowData

You can use this action to search for a specific element and store the entire row data in Qualitia hashmap as a key-value pair.

Parameters:

  • SearchElement: The element name you want to search.

Example: -

Action Name

Parameter1

SFDC.SearchAndStoreRowData

“SME000000006027”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

SearchElement is empty, null or blank

“Status : Failed Message: The SearchElement passed is invalid, please verify.”

When the script successfully navigates to the Tab

“Status : Passed Message: Row data is stored successfully.”

When an exception occurs

“Exception occurred while storing Row data. Exception: respective java exception will be displayed”

“StackTrace:” respective stack trace will be displayed

SFDC.GetTableValue

You can use this action to get the value for a specific key from Qualitia hashmap.

Parameters:

  1. ColName: The ColName is the Key From hashmap whose value to be pulled.

  2. DataVar: Pulled value is stored in DataVar variable.

 Example: -

Action Name

Parameter1

SFDC.GetTableValue

“$$Loan Application Name$$”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

The ColName parameter is empty, null or blank

“Status : Failed Message: The ColName passed is invalid, please verify.”

The DataVar parameter is empty, null or blank

“Status : Failed Message: The DataVar passed is invalid, please verify.”

When the script stores a value successfully

“Status : Passed Message: Value is stored successfully in the key ‘DataVar’.”

When an exception occurs

“Exception while pulling value of ‘ColName’. Exception: respective java exception will be displayed”

“StackTrace:” respective stack trace will be displayed

SFDC.GlobalSearchAndClick

You can use this action to search a string in the common global search edit box and click on the prompted search result.

Parameters:

  1. SearchString: The string you want to search

  2. SectionName: The name of the section in the result search string is prompted.
    Example: -

Action Name

Parameter1

Parameter2

SFDC.GlobalSearchAndClick

“Swagata Swagata”

“Swagata Swagata”

 The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

On success

“Link to search result is clicked after searching for element using global search”

Searchstring is blank, null, empty

Failed to execute the action, value cannot be empty for mandatory parameter 'searchString'. Please verify the value.

SectionName is empty, null or blank

Failed to execute the action, value cannot be empty for mandatory parameter 'sectionName'. Please verify the value.

SFDC.ClickEditIcon

You can use this action to click a specific edit button based on its label name.

Parameters:

  • labelName: Respective label name of the Edit button to be clicked.

Example: -

Action Name

Parameter1

SFDC. ClickEditIcon

“LabelName”

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

TabName is empty, null or blank

Failed to execute the action, the value cannot be empty for mandatory parameter 'labelName'. Please verify the value.

TabName is invalid

“Unable to find Edit icon with label name <labelName >”

SFDC.ScrollEntireTable

You can use this action to scroll the table down to the visibility of its last row.

Example: -

Action Name

Parameter1

SFDC.ScrollEntireTable

NA

The following Data Logs are displayed as per the exceptions occur.

Action

Data Logs

When the browser is not launched

Exception occurred for keyword: SFDC.ScrollEntireTable