List of Keywords - System Keywords 5


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 last list of various system keywords to understand their utility.


1. LeftTrim 


This keyword removes white spaces (space) before a given string. It is mostly used in situations when you want to remove spaces before a string before clicking or doing any action on it. 


Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in the String 



Output Data

  

                         Condition

                  Output Value

If the keyword passes successfully

It gives the left-trimmed string 

If an error is there

False


Error Conditions


 

Conditions

Error Message 

Debug Information 

If the String Value is null 

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

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. 

 

 

2. RemoveDelimiter 


This keyword splits a given string without the delimiter. It is mostly used when you want to split the provided string before clicking or doing any action on it. 


Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.

Input Data


Input Data Required

Description

String

This Keyword takes value in the String.

Delimiter

Provide a special character from where you want to split.  



Output Data

  

                         Condition

                  Output Value

If the keyword passes successfully

It gives the string without the delimiter which is provided in the data input argument. 

If an error is there

False


Error Conditions

 

Conditions


Error Message 

Debug Information 


If the String Value is null 


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


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. 


If the string is Provided but no Value in the Delimiter 

 


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


 

 


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. 

 If Delimiter is Provided but no Value in the string 


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


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. 


 


 

3. ReplaceSubString 


This keyword replaces the old sub-string from the new sub-string provided in the data input argument. It is mostly used in situations where you want to replace the new sub-string with the old one. 


For example, you want to replace the highlighted red sub-string cresconnect.crestech > from crestech to crestechglobal >.You can use the input data in the following manner to get the desired output :-


String 

cresconnect.crestech > 

Old Sub-String 

crestech > 

New Sub-String 

crestechglobal > 

Output 

cresconnect.crestechglobal > 




In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.


Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in String, Old Sub-String, and New Sub-String  



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the new string in which the new substring is added 

If an error is there

False


Error conditions 


 


Conditions


Error Message 

Debug Information 


If the String Value is null 


The string1 argument is missing  


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. 


If String Value and New Sub-String Value is provided but Old Sub-String Value is not provided 

 


System.ArgumentException: String cannot be of zero length. 

Parameter name: oldValue 

at System.String.ReplaceInternal  

(String oldValue, String newValue) at A.cdb444caf4f5ad03e 

34dc7fb638127381. 

c8852d929a117b2bb4b6653632 

502659e 

(String cb4e98476b566f 

4c4b25f589ece0a7 

261, String c6f421d2fe50e5d 

8e4ddd6b06045 

9c2f1, String c59bb9c6cff9f592 

311561615031fc16e) in File684:line 81


 

 


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. 

 


 

 

4. RightTrim 


This keyword removes white spaces (space) after a given string. It is mostly used in situations where you want to remove spaces after string before clicking or doing any action on it. 


For example, if you want to trim a given string '   Hello, World!   '  from the right side, you can use input data in the following manner:-


String 

'   Hello, World!   ' 

Output 

'   Hello, World!' 




In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.



Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in the String 



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the right trimmed string 

If an error is there

False


Error conditions 


 


Conditions


Error Message 

Debug Information 


If the String Value is null 


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

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. 


 

5. Split 


This keyword splits the specified string from the given index and delimiter. It is mostly used in situations where you want to split the string. 


For example, If you want to split the string cresconnect.crestech as per <.> delimiter and Index as <1>, you can use input the data in the following manner:-


If you want to return a True Output,


String 

cresconnect.crestech 

Delimiter 

<.> 

Index 

<1> 

Output 

crestech 

  




In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.


Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in String with delimiter, delimiter, and index  

Note: Delimiter takes a single value from where you want to split. 

The index takes a single value in an integer. 



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the string of the provided index 

If an error is there

False


Error conditions 


 


Conditions


Error Message 

Debug Information 


If the String Value is null 


The string1 argument is missing 

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. 

 



6. StringConcat 


This keyword concatenates the strings provided in the data input argument. It is used in situations where you want to link together multiple strings and create a new concatenated string. 


For example, If you want to concatenate multiple strings such as cres, tech, and global together, you can use input data in the following manner.


If you want to return a True Output, 


String1 

cres 

  

String2 

tech 

  

String3 

global 

  

Output 

crestechglobal 

  


Note: User Can Add Multiple Strings as per the requirement. 




In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.


Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in string1, string2 etc. (as per requirement) 

 



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the concatenated string 

If an error is there

It gives Blank data 


 

7. SubString 


This keyword extracts a substring from a specified main string, starting from the specified Position till the Number of specified characters. It is mostly used in situations where you want to retrieve a substring from the main string. 


For example, if you want to extract substring automation starting from index 4 and up to 4 letters in length, this is how you will use this keyword -  


Text 

automation  

Start Index 

<2> 

Length 

<4> 

Output 

Toma 


Test Object



In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

Text 

This Keyword takes test value in string format 

 

Start Index 
This Keyword takes a single value in the start Index. (From where you want to extract the data). 
Length 
This Keyword takes Length in integer. (Up To where you want to extract) 



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the text which starts from 2 index Upto length 4. 

If an error is there

False




Error conditions 


 


Conditions


Error Message 

Debug Information 

If All Values are Null 


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

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. 

 

 If the Last Index and length   is   more than one is         selected  

Index and length must refer to a location within the string. 

Parameter name: length 


Argument Data Invalid (-13300)  

  

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. 




 

8. ToLower 


This keyword converts a string to lowercase. It is mostly used in situations where you want to convert an upper-case string into lowercase before clicking or doing any action on it. 


For example, If you want to convert a uppercase string AUTOMATION  into lowercase, You can use the input data in the following manner:-


ToLower 

  

String 

AUTOMATION 

Output 

automation 



In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.


Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in the String 

Note: You can provide a String in Uppercase.  

 



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the string in lowercase 

If an error is there

False




Error conditions 


 


Conditions


Error Message 

Debug Information 

If the String Value is null 


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

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. 

 

  

  

  

9. ToUpper 


This keyword converts a string to uppercase. It is mostly used in situations where you want to convert a lowercase string into uppercase before clicking or doing any action on it. 


For example,If you want to convert a lowercase string automation into uppercase, you can use the input data in the following manner:-



ToUpper 

String 

automation 

  

Output 

AUTOMATION 

  




In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.


Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in String 

Note: You can provide a String in Lower case  



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the string which is in the upper case 

If an error is there

False




Error conditions 


 


Conditions


Error Message 

Debug Information 

If the String Value is null 


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

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. 


 

10. Trim 


This keyword removes the white spaces (space) before and after the string. It is mostly used in situations where you want to remove the spaces before clicking or doing any action on it. 



Example 


If you want to Trim the white spaces before and after the specified string, here is how you will use this keyword. 


Trim 

  

String 

<   Automation   > 

Output 

<Automation> 




In this Keyword, adding a Test Object argument was not required. Hence, we have mentioned it is not required.




Test Object


Test Object Required?

Description

No

This keyword doesn’t take any object input argument.


Input Data


Input Data Required

Description

String

This Keyword takes value in the String 



Output Data

  

                         
        Condition

                  Output Value

If the keyword passes successfully

It gives the string which is trimmed from both ends 

If an error is there

False




Error conditions 


 


Conditions


Error Message 

Debug Information 

If the String Value is null 


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

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. 

 

 

 

Click Here to learn more about Opkey features.

To learn more about using these keywords in a test case, 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

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article