List of Keywords - System Keywords 1


To learn how to use System keywords in Opkey, you can read Using System Keywords - New UI and Using System Keywords - Opkey Classic. Now, let's go through the first list of system keywords and their utility.

 
1. KeyPress 


This keyword sends keystrokes to the active application window It takes Key and No. of repetition as the input parameter. 

 

 

Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

Key

Name of the key in string format

Note: Please provide the String name in Curly Braces.

 

Output Data Value

  

Condition
Output Value

If the keyword passes successfully 

True

If there is an error

False 


Example 


If you want to press a key, here is how you will use this keyword 

 

Key 

{ENTER} 

Output 

True 

  

Error conditions 

  

Condition 

Debug Information 

Message 

If the key value is null 

Argument data missing (-13200) 

 
 

 

One or more of the arguments have not been provided a value 

 

2. KillProcess 


This keyword kills or stops specified Process. It takes the process name that you want to stop (eg. notepad.exe) as the input parameter. 

Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

Process name

Name of the process you want to kill in string format

 

Output Data Value

  

Condition
Output Value

If the keyword passes successfully 

True

If there is an error

False 


Example


If you want to kill the process, here is how you can use this keyword 


Process Name 

notepad.exe 

Output 

True 


Error conditions 


Condition 

Debug Information 

Message 

If Process Value is null 

Argument Data Missing (-13200)  

  

DESCRIPTION:  

A step can't proceed without values for mandatory arguments. Unlike optional ones, compulsory arguments must be filled with data, which can come from a static entry, a previous step's output, or a global variable. Leaving them empty is not allowed. 

 

 

Process names cannot be blank. 

 

3. SendString 


This keyword sends a string to the active application window. It takes KeyName as an input parameter. 

Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

KeyName

Name of the key in string format

Note: Please provide the String name in Curly Braces. 

 

Output Data Value

  

Condition
Output Value

If the keyword passes successfully 

True

If there is an error

False 


Example

If you want to send a key name (in string format), here is how you can use this keyword 

 

  

KeyName 

{ENTER} 

Output 

True 

  

  

Error conditions 

  

Condition 

Debug Information 

Message 

If the String Value is null 

Argument Data Missing (-13200)  

  

DESCRIPTION:  

A step can't proceed without values for mandatory arguments. Unlike optional ones, compulsory arguments must be filled with data, which can come from a static entry, a previous step's output, or a global variable. Leaving them empty is not allowed. 

 
 

 

One or more of the arguments have not been provided a value 

 


4. CompareString 

This keyword compares the two strings whether they are equal or not.  It returns True if the two strings are equal. It takes String1 & String2 as input parameters for comparison. 


Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

String1

This value is provided in operand 1 

String2

This value is provided in operand 2

IgnoreCase
This value is provided to ensure that the character case of strings is ignored while comparing

 

Output Data Value

  

Condition
Output Value

If the strings match successfully 

True

If strings do not match

False 


Example

If you want to compare the two strings, this is how you will use this keyword. 

 

  

String1 

<18> 

String2 

<18> 

  

5. IsEqual 


This keyword verifies whether the two given input values are equal or not. It returns True if the two given values are equal. It takes Operand1 & Operand2 as input parameters. 

Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

Operand1

This value is provided in operand 1 

Operand2

This value is provided in operand 2

 

Output Data Value

  

Condition
Output Value

If the values are equal 

True

If values are not equal

False 


Example


If you want to verify that both the operands' values are equal or not, you can use this keyword in the following way.

  

Operand1 

<18> 

Operand2 

<18> 

 

6. IsGreater 


This keyword verifies whether the First operand value is greater than the second. It returns True if the first specified integer value is greater than the second one. It takes Operand& Operand2 as input parameters. 


Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

Operand1

This value is provided in operand 1 

Operand2

This value is provided in operand 2

IgnoreCase
This value is provided to ensure that the character case of strings is ignored while comparing

 

Output Data Value

  

Condition
Output Value

If the first value is greater than the second 

True

If the first value is less than or equal to the second

False 


Example


If you want to verify that the first operand value is greater than the second one, here is how you will use this keyword. 

  

Operand1 

<18> 

Operand2 

<16> 

 


7. IsNotEqual 


This keyword verifies whether the specified Operands are not equal. It returns true if the given strings are not equal. It takes Operand& Operand2 as input parameters. 

Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

Operand1

This value is provided in operand 1 

Operand2

This value is provided in operand 2

 

Output Data Value

  

Condition
Output Value

If the first value is not equal to the second 

True

If the first value is equal to the second

False 


Example


If you want to verify that the first operand value is not equal to the second operand value, here is how you can use this keyword.  

 

Operand1 

<8> 

Operand2 

<11> 

 

8. IsSmaller 


This keyword verifies whether the first-string value is smaller than the second one or not. It is mostly used in situations where you want to verify that the first value present in the string is smaller or not. 

Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

Operand1

This value is provided in operand 1 

Operand2

This value is provided in operand 2

 

Output Data Value

  

Condition
Output Value

If the first value is smaller than the second 

True

If the first value is more than or equal to the second

False 


Example


If you want to verify that the first operand is smaller as compared to the second one, here is how you will use this keyword. 

 

Operand1 

<8> 

Operand2 

<11> 

 

9. StringContains 


This keyword verifies the sub-string from a specified string. It is mostly used in situations where you want to verify whether the substring is part of a string or not. 

Test Object

  

Object Input Required

Description

Not required 

Not required 

 
Input Data

Data Input Required

Description 

String1

This value is provided in string format for the first string 

String2

This value is provided in string format for the second string 

 

Output Data Value

  

Condition
Output Value

If the second string is part of the first string

True

If the second string is not part of the first string

False 


Example


If you want to verify that the substring is part of a string or not, here is how you will use this keyword. 

  

String1 

  

Selenium is a Test Automation tool

  

String2 

Automation 

  

 

10. VerifyValueInProcedure 


This keyword validates the value returned in the result when a procedure is executed. It takes Value, Procedure Name, Parameter Name, and Parameter Value as data input arguments. 

 

Test object 


Object Input Required 

Description 

Not required 

This keyword doesn’t take any object input argument. 


Input Data

Data Input Required 

Description 

Value 

Specify the Value returned from the Procedure. 

Procedure Name 

Specify the Procedure Name. 

Parameter Name 

Specify the Name of the parameter 

Parameter Value 

Specify the Value of the parameter 


Output Data Value


Condition
Output Value

If the keyword passes successfully

True 

If there is an error

False

 

Example

To validate the returned value in the result after executing a procedure, utilize the VerifyValueInProcedure keyword as follows:  

 

Value  

1000000130 

Procedure Name 

Proc 

Parameter Name  

@input1 

Parameter Value 

SchemaVersion 

 

Common Error conditions 

 

Scenarios 

Error Message 

Debug Information 

If no Data Input Argument is provided  

Argument Data Missing (-13200)  

DESCRIPTION:  

A step can't proceed without values for mandatory arguments. Unlike optional ones, compulsory arguments must be filled with data, which can come from a static entry, a previous step's output, or a global variable. Leaving them empty is not allowed. 

 
 

 

One or more of the arguments have been provided a value. 

When Invalid Data Input Arguments are provided 

Argument Data Invalid (-13300)  

DESCRIPTION:  

The data value for one or more input arguments does not match the expected format or predefined set of values. Please review for spelling errors and capitalization. 

Data Not Provided 

 

11. VerifyValueInRecordSet 

 

This keyword matches the specified value with the actual value available in the database. It takes a value and database query as data input arguments. 


Test object 


Object Input Required 

Description 

Not required 

This keyword doesn’t take any object input argument. 


Input Data

Data Input Required 

Description 

Value 

Specify the value to be verified. 

Query 

Specify the database query. 


Output Data Value


Condition
Output Value

If the keyword passes successfully

True 

If there is an error

False

 

Example

 

If you want to validate the value in the Record Set, you can do so by using the VerifyValueInRecordSet keyword as follows: 

  

Value 

49 

  

Query 

select * from main_settings; 

  

 

Common Error conditions
 

Scenarios 

Error Message 

Debug Information 

When invalid input data is provided. 

Eg. Value: 4 5464 

Unable to verify value no- 45564 record found  

  

When Blank Data Input Arguments are passed 

Argument Data Missing (-13200)  

  

DESCRIPTION:  

A step can't proceed without values for mandatory arguments. Unlike optional ones, compulsory arguments must be filled with data, which can come from a static entry, a previous step's output, or a global variable. Leaving them empty is not allowed. 

One or more of the arguments have not been provided a value. 

  

 


12. CopyToClipBoard

 

This keyword copies data to the clipboard. It takes CopyString as the input parameter. It is mostly used in situations where you want to copy some data and paste it to a text file (for example: notepad, word, etc). 

Test object 


Object Input Required 

Description 

Not required 

This keyword doesn’t take any object input argument. 


Input Data

Data Input Required 

Description 

CopyString

Give the string value that needs to be copied


Output Data Value


Condition
Output Value

If the keyword passes successfully

True 

If there is an error

False

 

Example


Use this keyword to provide a value in CopyString, and then execute it. Open a text editor like Notepad or Word. Paste to see the string from the data input argument of the keyword. 


Error conditions 

  

Condition 

Message 

Debug Info 

If no value is given in Data Input Arguments 

Argument Data Missing 

The copy argument string is missing 

  


13. ConvertToBoolean 


This keyword converts the input value to a boolean. It takes the input value as the input parameter. It is used in situations where you want to convert value into Boolean. 


Test object 


Object Input Required 

Description 

Not required 

This keyword doesn’t take any object input argument. 


Input Data

Data Input Required 

Description 

Value

Give the valid values (can be String, Integer, Boolean, or Double) 


Output Data Value


Condition
Output Value

If the keyword passes successfully

True 

If there is an error

False

 



Error conditions 

Condition 

Message 

Debug Info 

If  invalid values are provided 

Argument Data Invalid 

Conversion from string "hello123.235uyrt^&%^&" to type 'Boolean' is not valid. 

 

14. ConvertToDateTime 


This keyword converts the string of specified format to DateTime format. It takes SourceString & SourceFormat as input parameters. 


Test object 


Object Input Required 

Description 

Not required 

This keyword doesn’t take any object input argument. 


Input Data

Data Input Required 

Description 

SourceString

Give a string containing the date as input. 

SourceFormat

The format used in the source string (eg dd/mm/yy).


Output Data Value


Condition
Output Value

If the keyword passes successfully

Input string in DateTime format 

If there is an error

No value

 


Error conditions 

Condition 

Message 

Debug Info 

If invalid values are provided 

Argument Data Invalid 

The string was not recognized as a valid DateTime. 

 

15. ConvertToDouble 


This keyword converts the Input value to double. It takes input value and precision as input parameters. It is used in situations where you want to convert the value in double, ie. in decimal format. 

Test object 


Object Input Required 

Description 

Not required 

This keyword doesn’t take any object input argument. 


Input Data

Data Input Required 

Description 

Input Value

Specify the integer value. 

Precision

Specify the number of fractional digits in the return value.


Output Data Value


Condition
Output Value

If the keyword passes successfully

Input string converted to double 

If there is an error

No value

 


Error conditions 


Condition 

Message 

Debug Info 

If  invalid values are provided