To learn how to use Utility keywords in Opkey, you can read Using Utility Keywords - New UI and Using Utility Keywords - Opkey Classic. Now, let's go through the list of Web keywords and their utility.
Excel_VerifyColumnCount
This keyword verifies the number of Columns corresponding to the specified Row Number of an Excel file.
Note: The Excel_Open Keyword is always used before this keyword.
Example
Test Object
Input Data
Output Data
Error conditions
3. Excel_VerifyRowCount
This keyword verifies the number of rows corresponding to the specified Column Number of an Excel file.
Note: The Excel_Open Keyword is always used before this keyword.
Example
Test Object
Input Data
Output Data
Error conditions
4. Excel_ClearCellValue
This keyword clears the value of a cell in an Excel file based on the data input arguments provided.
Note: Excel_Open Keyword is always used before this keyword.
Example
Example
Test Object
Input Data
Output Data
Error conditions
5. Excel_ClearColumn
This keyword clears column (s) of the Excel file based on the data input argument provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Test Object
Input Data
Output Data
Error conditions
6. Excel_ClearRows
This keyword clears Row(s) of Excel file based on the data input argument provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Example :-
Excel_ClearRows
Test Object
Input Data
Output Data
Error conditions
7. Excel_Close
This keyword helps close the currently opened Excel reference File. It takes Excel Reference as Data Input Arguments.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Test Object
Input Data
Output Data
Error conditions
8. Excel_CloseAll
This keyword closes all the opened Excel File.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Suppose you want to close all the opened Excel files saved on your system then you can use Excel_CloseAll keyword.
Test Object
Input Data
Output Data
Error conditions
There are no error conditions for this keyword.
9. Excel_CompareCellValue
This Keyword compares the values of two specified cells within the same Excel file or two different Excel files based on the Data Input Arguments provided.
Note: Excel_Open Keyword is always used before this keyword.
Example:-
Excel_CompareCellValue
Test Object
Input Data
Output Data
Error conditions
10. Excel_CompareColumns
This Keyword compares the values of two specified Columns within the same Excel file or two different Excel files based on the Data Input Arguments provided.
Note: Excel_Open Keyword is always used before this keyword.
Example:-
Excel_CompareColumns
Note:
The value of the delimiter is Semicolon(;) by default.
Test Object
Input Data
Output Data
Error conditions
11. Excel_CompareRows
This Keyword compares the values of two specified Rows within the same excel file or two different Excel files based on the Data Input Arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Example :-
Excel_CompareRows
Note:
The value of the delimiter is Semicolon(;) by default.
Test Object
Input Data
Output Data
Error conditions
12. Excel_CompareSheet
This keyword is used to compare two Excel sheets with in single excel file or two different excel file based on data input arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Test Object
Input Data
Output Data
Error conditions
13. Excel_CopyAndPasteCellValue
This keyword is used to copy and paste particular cell value (s) within single excel sheet or within two different excel sheet or within 2 different excel sheets of 2 different excel files based on the Data Input Arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword. The Excel File must be closed before using this Keyword.
Example :-
Excel_CopyAndPasteCellValue
Test Object
Input Data
Output Data
Error conditions
14. Excel_CreateFile
This keyword creates a new Excel file, it supports only .xlsx and xls format file. It takes File path and Sheet name (optional) as data input arguments.
Note: Specify the Excel Path of the file with .xlsx or xls Extension
Test Object
Input Data
Output Data
Error conditions
15. Excel_DeleteRow
This keyword is used to delete row(s) from the particular Excel sheet based on the data input arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Example :-
Excel_DeleteRow
Test Object
Input Data
Output Data
Error conditions
16. Excel_DuplicateSheet
This keyword is used to create a duplicate copy of an Excel sheet within an Excel File based on the data input arguments provided.
Note: Excel_Open Keyword is always used prior
to this keyword.The Excel File must be closed before using this Keyword.
Example
Suppose you want to Create a Duplicate Sheet of an Excel Sheet within an Excel File saved on your system then here is how you will use Excel_DuplicateSheet keyword:
Excel_DuplicateSheet
Test Object
Input Data
Output Data
Error conditions
17. Excel_GetCellValue
This keyword will fetch the value from a specified cell of an Excel File based on the Data Input Arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Excel_GetcellValue
Test Object
Input Data
Output Data
Error conditions
18. Excel_GetColumnCount
This Keyword Returns the number of columns in the specified Excel file. This keyword is used in a situation where user wants the Column Count of an Excel file with the help of Row Number.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Excel_GetColumnCount
Test Object
Input Data
Output Data
Error conditions
19. Excel_GetColumnValue
This keyword will fetch the value from a specified Column of an Excel File based on the Data Input Arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Excel_GetColumnValue
Note:
The value of the delimiter is Semicolon(;) by default.
Output
Green#Yellow#Orange#Violet#Royal Blue
Test Object
Input Data
Output Data
Error conditions
20. Excel_GetRowCount
This Keyword Returns the number of Rows in the specified Excel file. This keyword is used in a situation where user wants Row Count of an Excel file with the help of Column Number.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Excel_GetRowCount
Test Object
Input Data
Output Data
Error conditions
21. Excel_GetRowValue
This keyword will fetch the value from a specified Row of an Excel File based on the Data Input Arguments provided.
Note: ExcelOpen Keyword is always used prior to this keyword.
Example
Excel_GetRowValue
Note:
The value of the delimiter is Semicolon(;) by default.
Output
Yellow#White#Brown
Test Object
Input Data
Output Data
Error conditions
22. Excel_InsertBlankRows
This keyword is used to insert the blank row (s) in the Excel sheet of a particular Excel file based on the data input arguments provided.
Note: ExcelOpen Keyword is always used prior to this keyword. The Excel File must be closed before using this Keyword.
Example
Excel_InsertBlankRows
This keyword will insert blank rows as follows:
Test Object
Input Data
Output Data
Error conditions
23. Excel_Open
This keyword opens an Excel File. It takes ExcelFile and ExcelReference (which can be referenced for other Excel keywords) as Data Input Arguments.
Test Object
Input Data
Output Data
Error conditions
24. Excel_RenameSheet
This keyword is used to rename a particular Excel sheet within the Excel file based on the data input arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword.
Example
Excel_RenameSheet
Tes object and Input Data
Output Data
Error conditions
25. Excel_SetBackGroundColor
This keyword is used to set the background color of a particular cell in an Excel file based on the data input arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword. The Excel file must be closed before using this Keyword.
Example
Excel_SetCellBackgroundColor
This keyword will set the Color of the specified cell as Blue(w.r.t the figure)
Note:
You can provide any of the following listed colors as the Background Color [Data Input Argument].
Test Object
Input Data
Output Data
Error conditions
26. Excel_SetCellTextColor
This keyword is used to set the Text Color of a particular cell in an Excel file based on the data input arguments provided.
Note: Excel_Open Keyword is always used before this keyword. The Excel file must be closed before using this Keyword.
Example
Excel_SetCellTextColor
This keyword will set the Text Color of the specified cell as Blue(w.r.t the figure)
Note:
You can provide any of the following listed colors as the Text Color [Data Input Argument].
Test Object
Input Data
Output Data
Error conditions
27. Excel_SetRowValue
This keyword is used to set the Value of a specified Row in an Excel sheet of an Excel file based on the data input arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword. The Excel file must be closed before using this keyword.
Example
Excel_SetRowValue
Note:
The value of the delimiter is Semicolon(;) by default.
Test Object
Input Data
Output Data
Error conditions
28. Excel_SetColumnValue
This keyword is used to set the Value of a specified Column in an Excel sheet of an Excel file based on the data input arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword. The Excel file must be closed before using this Keywword.
Example
Excel_SetColumnValue
Note:
The value of the delimiter is Semicolon(;) by default.
Test Object
Input Data
Output Data
Error conditions
29. Excel_UtilityPressKeys
This Keyword press keys to the native application window. It takes keys as Data input argument.
Example
Note: The key Name is always provided within { } brackets.
Test Object
Input Data
Output Data
Error conditions
30. Excel_SetCellValue
This keyword is used to set a Cell value in Excel file based on the data input arguments provided.
Note: Excel_Open Keyword is always used prior to this keyword. The Excel file must be closed before using this Keyword.
Example
Excel_SetCellValue
Test Object
Input Data
Output Data
Error conditions
To learn how you can use these keywords in test scenarios, you can visit https://university.opkeylms.com and enroll in our Opkey series course.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article