1. Home
  2. Docs
  3. OpKey Help
  4. 17. Keywords in Opkey Test Surge
  5. 17.2 System Keywords

17.2 System Keywords

Action Keywords

HandleExpectedPopup

This keyword handles specified popup once during the execution using TAB and ENTER keys combination.

It takes WindowTitle, Number Of Tabs & WaitTime as input parameter.

For example, you want to remove or handle the popup present on window then you can use this keyword.

Input Arguments

 

Object Input Arguments

Required?

No

No

 

Data Input Arguments

Required?

Description

Window Title

Yes

This Keyword takes value in String

Number of Tabs

Yes

This Keyword takes Value in integer

Wait Time

Yes

This Keyword takes Value in Integer

 

Output

 

True

If the keyword passes successfully

False

If an error is there.

Example

If you want to Handle the popup, here is how you will use this keyword.

HandleExpectedPopup

Window Title

Please select a Valid From City

Number of Tabs

2

Wait Time

10

Output

True

 

Error conditions

 

Condition

Debug Information

Message

If  Data input Argument is  null or Window Title is null

Argument Data Invalid (-13300)

 

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

Window Title must not be empty

KeyPress

This keyword is used to send keystrokes to the active application window.

It takes Key, No. of repetition as input parameter.

For example, you want to press a key from keyboard then you can use this keyword.

Input Arguments

 

Object Input Arguments

Required?

No

No

 

Data Input Arguments

Required?

Description

Key

Yes

This Keyword takes value in String

 

Output

 

True

If the keyword passes successfully

False

If an error is there.

Example

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

KeyPress

Key

{ENTER}

Output

True

 

Error conditions

 

Condition

Debug Information

Message

If Key Value is null

Argument Data Missing (-13200)

 

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

KillProcess

This keyword kills the specified Process. It takes the process name (notepad.exe) as input parameter.

For example, you want to kill the process.

Input Arguments

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

Process Name

Yes

This Keyword takes value in String

Output

True

If the keyword passes successfully

False

If an error is there.

Example

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

KillProcess

Process Name

notepad.exe

Output

True

Error conditions

Condition

Debug Information

Message

If Process Value is null

Argument Data Missing (-13200)

 

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

Process name can not blank

SendString

This keyword is used to send string to the active application window. It takes KeyName as input parameter.

For example, you want to sendString.

Input Arguments

 

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

KeyName

Yes

This Keyword takes value in String

 

Output

 

True

If the keyword passes successfully

False

If an error is there.

Example

If you want to Send a key (in String), here is how you will use this keyword

SendString

 

KeyName

{ENTER}

Output

True

 

Note: Please provide the String name in Curly Braces.

 

Error conditions

 

Condition

Debug Information

Message

If String Value is null

Argument Data Missing (-13200)

 

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

Assertion Keywords

CompareString

This keyword is used to compare the two strings whether they are equal or not.

It returns True if the two strings are equal. It takes String1 & String2 as input parameter.

For example, you want to verify the CompareString

Input Arguments

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

String1

Yes

This Keyword takes value in Operand 1

String2

Yes

This keyword takes Value in Operand 2

Ignore Case

Not Mandatory

This Keyword takes Value in Ignore Case.

 

Output

 

True or False

If the keyword passes successfully

 

Example

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

 

CompareString

 

String1

<18>

Output2

<18>

IsEqual

This keyword is used to verify whether the given Values are Equal or not.

It returns True if the two given Integers are Equal. It takes String1 & String2 as input parameter.

For example, you want to verify the IsEqual.

Input Arguments

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

Operand1

Yes

This Keyword takes value in Operand 1

Operand2

Yes

This keyword takes Value in Operand 2

 

Output

True or False

If the keyword passes successfully

 

Example

If you want to verify that both the operands value are equal or not.

 

IsEqual

 

Operand1

<18>

Operand2

<18>

IsGreater

This keyword is used to verify whether the First Operand Value is Greater than the second One. It returns True if First specified integer value is greater than second one. It takes String1 & String2 as input parameter.

For example, you want to verify the IsGreater.

Input Arguments

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

Operand1

Yes

This Keyword takes value in Operand 1

Operand2

Yes

This keyword takes Value in Operand 2

Output

True or False

If the keyword passes successfully

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.

IsGreater

Operand1

<18>

Operand2

<11>

IsNotEqual

This keyword verifies that the specified Operands are not equal. It returns true if the given strings are not equal. It takes String1 & String2 as input parameter.

For example, you want to verify the IsNotEqual.

Input Arguments

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

Operand1

Yes

This Keyword takes value in Operand 1

Operand2

Yes

This keyword takes Value in Operand 2

Output

       

True or False

If the keyword passes successfully

Example

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

IsNotEqual

Operand1

<8>

Operand2

<11>

IsSmaller

This keyword verifies that 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 string is smaller or not.

For example, you want to verify the IsSmaller.

Input Arguments

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

Operand1

Yes

This Keyword takes value in String1

Operand2

Yes

This keyword takes Value in String2

Output

True or False

If the keyword passes successfully

       

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.

IsSmaller

Operand1

<8>

Operand2

<11>

StringContains

This keyword verifies the sub String into the Specified String. It is mostly used in situations where you want to verify that the sub string is the part of string or not.

For example, you want to verify the sub string.

Input Arguments

 

Object Input Arguments

Required?

No

No

Data Input Arguments

Required?

Description

String1

Yes

This Keyword takes value in String1

String2

Yes

This keyword takes Value in String2

 

Output

 

True/False

If the keyword passes successfully

       

Example

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

 

StringContains

 

String1

 

Selenium is the Test Automation

 

Output2

Automation

VerifyValueInProcedure

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

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Value

Yes

Specify the Value returned from the Procedure.

Procedure Name Yes Specify the Procedure Name.
Param Name Yes Specify the Name of the parameter
Param Value Yes Specify the Value of the parameter

Output

True

If the keyword passes successfully

False

If an error is there

Example

Let us consider the Following Procedure in MySQL

1.jpg

If you want to validate the value returned in the result when a procedure is executed, you can do so by using VerifyValueInProcedure keyword as follows:

VerifyValueInProcedure

Value

1000000130

Procedure Name

Proc

Param Name @input1
Param Value SchemaVersion

Common Error conditions

Scenarios

Error Message

Debug Information

If  no Data Input Argument is provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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 was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

Data Not Provided

VerifyValueInRecordSet

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

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Value

Yes

Specify the Value to be verified

Query Yes Specify the Query.

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

1.jpg

Consider the screenshot above of a table, if you want to validate the value in the Record Set, you can do so by using VerifyValueInRecordSet keyword as follows:

VerifyValueInRecordSet

 

Value

49

Query

select * from main_settings;

Common Error conditions

Scenarios

Error Message

Debug Information

When invalid Data Input Arguments are provided.

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 could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

 

Clipboard Keywords

CopyToClipBoard

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

Input Arguments

 

Object Input Arguments

Required?

Description

Object

No

Not required

 

Data Input Arguments

Required?

Description

CopyString

Yes

Provide copy string

Note: Give the string value which needs to be copied.

 

Output

 

True

If the keyword passes successfully

False

If there was an error

Example

If you use this keyword and give the value in CopyString and then execute it. When execution is complete, open notepad (or Word, etc.) and paste it. It will paste the string given in data input argument of the keyword.

Error conditions

 

Condition

Message

Debug Info

If no value is given in Data Input Arguments

Argument Data Missing

Copy argument string is missing

 

Conversion Keywords

ConvertToBoolean

This keyword converts the Input value to boolean. It takes input value as input parameter.

It is mostly used in situations where you want to convert value into Boolean.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Not required

Data Input Arguments

Required?

Description

Input Value

Yes

Specify the Input Value.

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

Output

True

If the keyword passes successfully

False

If there was an error

Example

Here, you can use this keyword to convert String (or Integer or Boolean or Double) value of DataType into Boolean and the output will be True/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.

ConvertToDateTime

This keyword converts the string of specified format to DateTime. It takes SourceString & SourceFormat as input parameter. This keyword is mostly used in situations where you want to convert value into DateTime.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Not required

Data Input Arguments

Required?

Description

SourceString

Yes

A String which contains the Date.

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

SourceFormat

Yes

The Format used in the Source String (eg dd/mm/yy).

Output

If the value provided is correct then the output will be in Date Time format otherwise it will display no value.

Example

Here, you can use this keyword to convert String value of DataType into DateTime format and the output will be in Date Time.

Error conditions

Condition

Message

Debug Info

If  invalid values are provided

Argument Data Invalid

String was not recognized as a valid DateTime.

ConvertToDouble

This keyword converts the Input value to double. It takes Input Value & Precision as input parameter.

It is mostly used in situations where you want to convert value in Double, ie. in decimal format.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Not required

Data Input Arguments

Required?

Description

Input Value

Yes

Specify the Input Value.

Note: Give the integer value.

Precision

Yes

Specify the number of fractional digits in the return value.

Note: Give the integer value.

Output

If the value provided is correct then the output will be in Double otherwise it will display no value.

Example

Here, you can use this keyword to convert Integer value of DataType into Double and the output will be in Decimal format.

Error conditions

Condition

Message

Debug Info

If  invalid values are provided

Argument Data Invalid

Conversion from string “hello.mnnb” to type ‘Double’ is not valid.

ConvertToInteger

This keyword converts the Input value to integer. It takes Input Value & RoundOff as input parameter.

It is mostly used in situations where you want to convert value in Integer.

Input Arguments

 

Object Input Arguments

Required?

Description

Object

No

Not required.

 

Data Input Arguments

Required?

Description

Input Value

Yes

Specify the Input Value.

Note: Give the integer value.

RoundOff

Yes

Specify whether roundoff the input value or not.

Output

If the value provided is correct then the output will be in Integer otherwise it will display no value.

Example

Here, you can use this keyword to convert Integer (or Double) value of DataType into Integer and the output will be in Integer format.

Error conditions

Condition

Message

Debug Info

If  invalid values are provided

Argument Data Invalid

Conversion from string “hello” to type ‘Integer’ is not valid.

ConvertToString

This keyword converts the Input value to string. It takes Input Value as input parameter.

It is mostly used in situations where you want to convert value in String.

Input Arguments

 

Object Input Arguments

Required?

Description

Object

No

Not required.

 

Data Input Arguments

Required?

Description

Input Value

Yes

Specify the Input Value.

Note: Give the integer value.

Output

If the value provided is correct then the output will be String.

Example

Here, you can use this keyword to convert String (or Integer or Boolean or Double) value of DataType into String and the output will be in String format.

Note: No error condition available for this keyword.

 

Database Keywords

ConnectDatabase

This keyword is used  to Connect to a Database. It takes database Driver Name and connection string as data input arguments.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Driver

Yes

Specify the Driver Name.

Example:

MySQL :- MySQL

Oracle :- Oracle

SQLSERVER :System.Data.SQlClient

SQLLite :Sqlite

Connection String Yes Specify the Connection String required to connect to the database.

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to connect to a database , you can do so by using ConnectDataBase keyword as follows:

ConnectDataBase

Driver

< Specify the Driver Name  > Here,  mysql

Connection String

server=localhost;uid=root;pwd=root;

database=

mydatabase; < Here, Database Name= mydatabase >

Common Error conditions

Scenarios

Error Message

Debug Information

When Invalid data arguments are provided.

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

Data Not Provided

When no data input arguments are provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

DisconnectDatabase

This keyword is used to disconnect from a Database. It does not take any input arguments.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

No

No

This keyword doesn’t take any data input argument.

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to disconnect from a DataBase, you can do so by using Disconnect DataBase keyword. Before using  Disconnect DataBase keyword, It is mandatory to successfully connect to the DataBase.

Common Error conditions

Scenarios

Error Message

Debug Information

When DataBase has never been connected

Unsatisfied Dependencies (-14200)

DESCRIPTION:

Some dependency was required but could not be located or loaded. Mostly the dependencies are binaries in form of jar/exe/dll, but others are also possible. They could be network resources like databases, DCOM servers, RMI targets, web services etc.

Currently the connection with DataBase is not present

ExecuteQuery

This keyword is used to execute a Database query. It takes Query as Data Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Query

Yes

Specify the Database Query

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to execute a DataBase Query, you can do so by using ExecuteQuery keyword as follows:

ExecuteQuery

Query

Select  * from main_settings;

Common Error conditions

Scenarios

Error Message

Debug Information

When Blank Data  Input Argument is provided.

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

When Invalid Data Input Argument is provided.

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

CresTech.OpKey.Exceptions.

MalformedQueryException: Unable to execute query. Possibly syntax error or insufficient parameters.

FetchAllRecordsFromDatabase

This keyword is used to fetch a @:@:@:@ separated recordset database. It takes database Query as data input argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Query

Yes

Specify the Database Query.

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to fetch a @:@:@:@ separated recordset database, you can do so by using FetchAllRecordsFromDataBase keyword as follows:

FetchAllRecordsFromDatabase

Query

select *  from main_settings;

Common Error conditions

Scenarios

Error Message

Debug Information

When Invalid data arguments are provided.

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

CresTech.OpKey.

Exceptions.

MalformedQuery

Exception: Unable to execute query. Possibly syntax error or insufficient parameters.

When no data input arguments are provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

FetchRecordSetFromDatabase

This keyword is used to fetch a #:#:#:# separated recordset database. It takes database Query as data input argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Query

Yes

Specify the Database Query.

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to fetch a #:#:#:# separated recordset database, you can do so by using FetchRecordSetFromDataBase keyword as follows:

FetchRecordSetFromDataBase

Query

select * from main_settings;

Common Error conditions

Scenarios

Error Message

Debug Information

When Invalid data arguments are provided.

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

CresTech.OpKey.

Exceptions.

MalformedQuery

Exception: Unable to execute query. Possibly syntax error or insufficient parameters.

When no data input arguments are provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

FetchValueFromDatabase

This keyword is used to fetch a single value from database. It takes Query as Data Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Query

Yes

Specify the Database Query

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to fetch to fetch a single value from database, you can do so by using FetchValueFromDataBase keyword as follows:

FetchValueFromDatabase

 

Query

select *  from main_settings;

Common Error conditions

Scenarios

Error Message

Debug Information

When Invalid data arguments are provided.

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

CresTech.OpKey.

Exceptions.

MalformedQuery

Exception: Unable to execute query. Possibly syntax error or insufficient parameters.

When no data input arguments are provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

FetchValueFromProcedure

This keyword is used to fetch single value from a procedure. It takes Procedure Name, Param Name, Param Value as data Input Arguments.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Value

Yes

Specify the Value returned from the Procedure.

Procedure Name Yes Specify the Procedure Name.
Param Name Yes Specify the Name of the parameter
Param Value Yes Specify the Value of the parameter

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

Let us consider the Following Procedure in MySQL

1.jpg

If you want to to fetch single value from a procedure, you can do so by using FetchValueFromProcedure keyword as follows:

FetchValueFromProcedure

Value

1000000130

Procedure Name

Proc

Param Name @input1
Param Value SchemaVersion

Common Error conditions

Scenarios

Error Message

Debug Information

If  no Data Input Argument is provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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 was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

Data Not Provided

GetColumnCountOfRecordSet

This keyword is used to fetch the number of columns of a recordset. It takes Query as Data Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Query

Yes

Specify the Database Query

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to fetch the number of columns of a recordset, you can do so by using GetColumnCountOfRecordSet keyword as follows:

GetColumnCountOfRecordSet

 

Query

select *  from main_settings;

Common Error conditions

Scenarios

Error Message

Debug Information

When Invalid data arguments are provided.

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

CresTech.OpKey.

Exceptions.

MalformedQuery

Exception: Unable to execute

query. Possibly

syntax error or insufficient parameters.

When no data input arguments are provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

GetRowCountOfRecordSet

This keyword is used to fetch the number of rows of a recordset. It takes Query as Data Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Query

Yes

Specify the Database Query

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to fetch the number of rows of a recordset, you can do so by using GetRowCountOfRecordSet keyword as follows:

GetRowCountofRecordSet

Query

select *  from main_settings;

Common Error conditions

Scenarios

Error Message

Debug Information

When Invalid data arguments are provided.

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

CresTech.OpKey.

Exceptions.

MalformedQuery

Exception: Unable to execute query. Possibly syntax error or insufficient parameters.

When no data input arguments are provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

UpdateDatabase

This keyword is used to execute update query in database. It takes a query as data input argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Query

Yes

Specify the Database Query

Output

 

True

If the keyword passes successfully

False

If an error is there

Example

If you want to update query in database, you can do so by using UpdateDataBase keyword as follows:

UpdateDatabase

 

Query

update main_settings set value=’130′ where Parameter_ID=’58faa9dd-d96f-4734-b7fc-6259d7c6718d’ and parameter=’SchemaVersion’;

Common Error conditions

Scenarios

Error Message

Debug Information

When Invalid data arguments are provided

Argument Data Invalid (-13300)

DESCRIPTION:

The data value for one or more input arguments was not what was expected. This might happen when the input is expected in a specific format or should be chosen from a predefined set of values. Check for spell errors and capsing.

CresTech.OpKey.

Exceptions.

MalformedQuery

Exception: Unable to execute query. Possibly syntax error or insufficient parameters.

When no data input arguments are provided

Argument Data Missing (-13200)

DESCRIPTION:

A step could not be executed because one or more of the arguments have not been provided a value. Of all the arguments a keyword accepts, some arguments might be compulsory. As opposed to the non-compulsory ones, the compulsory argument must be provided some data. The data may be provided through one of many sources like statically entering, output of a previous step, a global variable etc; but it must not be left blank.

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

 

Date Time Keywords

ConvertTimeToTimeZone

This keyword converts the time from source to destination time zone with respect to time of our local system.

It is used in situations where you want to convert the time from source time zone to destination time zone and your working system is being configured in different time zone.

For Example: you want to change time from “India Standard Time”, to “US Eastern Standard Time”, you can use this keyword.

Object Input Arguments

Required?

Object

No

Data Input Arguments

Required?

Description

SourceTime

Yes

Specify your required which you want to use for conversion.

Note: This time will be available to you as per your local system.

SourceTimeZone

Yes

Specify your Source Time Zone.

Note: Note:All timezone are specified at “https://technet.microsoft.com

/en-us/library/cc749073(v=ws.10).aspx”.

DestinationTimeZone

Yes

Specify your Destination Time Zone, in which you want your output.

Note: All timezone are specified at “https://technet.microsoft.com

/en-us/library/cc749073(v=ws.10).aspx”.

Output

Time according to destination time zone

If provided time zone is of correct format.

False

If provided data input arguments are blank or have invalid format.

Example

In the example above, if you want to get the time of  US and your local system is configured in Indian time zone, then provide  data input arguments.

Select source time from “SourceTime” argument, provide “SourceTimeZone” as “India Time Zone” and provide “DestinationTimeZone” as  “US Eastern Standard Time”.

It will provide time of according to destination time zone in output. here is how you will use this keyword  “ConvertTimeToTimeZone”.

SourceTime

2/7/2017 12:00:00 AM

SourceTimeZone

India Time Zone

DestinationTimeZone

US Eastern Standard Time

Note: Source time will be time of your system, and for getting name of time zones you can go to this link” https://technet.microsoft.com/en-us/library/cc749073(v=ws.10).aspx.

Error conditions

Condition

Message

Debug Info

If specified timezone is blank.

Argument Data Missing

Timezone argument is missing.

If specified timezone is invalid.

Argument Data Invalid

The time zone ID ‘US’ was not found on the local computer

GetTimeAtTimeZone

This keyword provides the time of specified time zone with respect to time of our local system. It is used in situations where you want to get the time of different time zone and your working system is being configured in different time zone.

For Example: your working system is configured in “India Standard Time”, but you want to see time in “US Eastern Standard Time”.

Object Input Arguments

Required?

Object

No

Data Input Arguments

Required?

Description

Timezone

Yes

Specify the time zone in which you want to get your output.

Note: All timezone are specified at “https://technet.microsoft.com/

en-us/library/cc749073(v=ws.10).aspx”.

Output

Time of specified timezone

If provided time zone is of correct format.

False

If timezone provided is blank or have invalid format.

Example

In the example above, if you want to get the time of  US, then provide it in data input argument“timezone” as “US Eastern Standard Time” and it will provide time of specified time zone. here is how you will use this keyword  “GetTimeAtTimeZone”.

TimeZone

Provide correct time zone

Note: Source time will be time of your system, and for getting name of time zones you can go to this link” https://technet.microsoft.com/en-us/library/cc749073(v=ws.10).aspx .

Error conditions

Condition

Message

Debug Info

If specified timezone is blank.

Argument Data Missing

Timezone argument is missing.

If specified timezone is invalid.

Argument Data Invalid

The time zone ID ‘US’ was not found on the local computer

 

Date Time Keywords

AddDateTime

This keyword is used to add a specific amount of days, months, year, hours, mins and seconds in a given date value.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

Date Time

Years

Months

Days

Hours

Minutes

Seconds

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Provide Date time Format

Provide Years

Provide Months

Provide Days

Provide Hours

Provide Minutes

Provide Second

Output

 

It should give  Date Time of current Day

If the keyword passes successfully

Positive Condition

 

Keyword Name

Input

Output

Status

AddDateTime

DateTime : 2/15/2017 12:00:00 AM

Years : 2

Months : 2

Days : 2

Hours : 2

Minutes : 2

Seconds : 2

4/17/2019 2:02:02 AM

Pass

Error conditions

Don’t Provide Input Argument

 

Input

Output

Status

Error Message

DateTime :

Years :

Months :

Days :

Hours :

Minutes :

Seconds :

Fail

Argument Data Missing

ConvertDateTimeFormat

This keyword converts a dateTime value according to some specified format.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

DateTime:4/17/2019 2:02:02 AM

FormatString:M/d/yyyy/m/h/s

Yes

Provide Date Time

Provide Date time Format

Output

It should give Converted date time as par Provided date time

If the keyword passes successfully

Positive Condition

 

Keyword Name

Input

Output

Status

ConvertDateTimeFormat

DateTime:

4/17/2019 2:02:02 AM

FormatString: M/d/yyyy/m/h/s

4/17/2019/0/12/0

Pass

Keyword Name

Input

Output

Status

ConvertDateTimeFormat

DateTime:

FormatString:

False

Fail

Message: Argument Data Missing

DateTimeDifference

This keyword returns the date difference in total days.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

FirstDate

Yes

Give Date string

For Example:2/15/2017,2-15-2017

Second Date

Yes

Give Date string

For Example:2/15/2017,2-15-2017

Format

Yes

Give Date Format

dd/MM/yyyy, dd-MM-yyyy

Output

It should give Number of days difference.

If the keyword passes successfully.

Positive Condition

Keyword Name

Input

Output

Status

DateTimeDifference

FirstDate:2/16/2017

SecondDate:2/16/2018

DateFormat:M/dd/yyyy

365

Pass

Error conditions

Provide Valid String and Invalid Format

Input

Output

Status

Error Message

FirstDate:2/16/2017

SecondDate:2/16/2018

DateFormat:MM-dd-yyyy

Fail

Argument Data Invalid

Provide FirstDate, SecondDate but don’t Provide Format

Input

Output

Status

Error Message

FirstDate:2/16/2017

SecondDate:2/16/2018

DateFormat:

365

Pass

Done

Don’t Provide Input Argument

Input

Output

Status

Error Message

FirstDate:

SecondDate:

DateFormat:

Fail

Argument Data Missing

GetCurrentDateTime

This keyword is used to get Current Date Time of the system. It used in such a condition when user want to get current day Date Time.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

Input Argument

No

Output

It should give  Date Time of current Day

If the keyword passes successfully

Positive Condition

Keyword Name

Input

Output

Status

GetCurrentDateTime

No

2/15/2017 7:43:19 PM

Pass

GetDayOfWeek

This Keyword is used to get the current week day number. It uses date on the basis of Date it gives the week number.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

Input Argument

No

Output

It should give  Date Time of current Day.

If the keyword passes successfully.

Example

If user use this keyword on 14 of Feb then it gives the output as 2 and if user use this keyword on 15 of Feb then it gives the output as 3.

Positive Condition

Keyword Name

Input

Output

Status

GetDayOfWeek

No

3

Pass

IsDate

This Keyword verifies that given format is date or not. It is used in such a condition where user want to verify provided date is date format or not.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

DateString

Yes

Give Date string

For Example: 2/15/2017,2-15-2017

DateFormat

Yes

Give Date Format

dd/MM/yyyy, dd-MM-yyyy

Output

True

If the keyword passes successfully

Positive Condition

Keyword Name

Input

Output

Status

IsDate

DateString: 2/15/2017

DateFormat: MM/dd/yyyy

True

Pass

Error conditions

Provide Valid String and Invalid Format

Input

Output

Status

Error Message

DateString:2/15/2017

DateFormat:MM-dd-yyyy

False

Fail

Argument Data Invalid

Not Provide Input Argument

Input

Output

Status

Error Message

DateString:2/15/2017

DateFormat:MM-dd-yyyy

False

Fail

Argument Data Missing

SubtractDateTime

This keyword is used to Subtract Date Time a specific amount of days, months, year, hours, mins and secs in a given date value.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

Date Time

Years

Months

Days

Hours

Minutes

Seconds

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Provide Date time Format

Provide Years

Provide Months

Provide Days

Provide Hours

Provide Minutes

Provide Second

Output

It Should give Date time after subtraction of years, Months, Days, Hours, Minutes, Seconds

If the keyword passes successfully

Positive Condition

Keyword Name

Input

Output

Status

SubtractDateTime

DateTime : 2/15/2017 12:00:00 AM

Years : 2

Months : 2

Days : 2

Hours : 2

Minutes : 2

Seconds : 2

4/17/2019 2:02:02 AM

Pass

Error conditions

Don’t Provide Input Argument

Input

Output

Status

Error Message

DateTime :

Years :

Months :

Days :

Hours :

Minutes :

Seconds :

Fail

Argument Data Missing

File Handling Keywords

AppendTextToFile

This keyword appends specified text to the given File. It used in such condition where user want to add Specific Text in file.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

FilePath

Yes

Give Path of File which is exist on system

TextToAppend

Yes

Give Text which you want to add in File

Output

True

If the keyword passes successfully

Positive Condition

Keyword Name

Input

Output

Status

AppendTextToFile

FilePath: File path which exists

TextToAppend:ABCD

True

Pass

Error conditions

Don’t Provide FilePath or TextToAppend

Input

Output

Status

Error Message

FilePath:

TextToAppend:

False

Fail

Argument Data Missing

Provide File path which does not exist.

Input

Output

Status

Error Message

FilePath:

TextToAppend:

Fail

Argument Data Invalid

CheckFileExists

This keyword is used to check whether the file exists or not.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

FilePath

Yes

Give Path of File which is exist on system

Output

True

If the keyword passes successfully

Positive Condition

Keyword Name

Input

Output

Status

CheckFileExist

FilePath:File path which exists

True

Pass

Error conditions

Provide File path which does not Exist.

Input

Output

Status

Error Message

FilePath: File path which does not exist.

False

Fail

Argument Data Invalid

CopyFile

This Keyword is used to copy file from source to destination. It is in such a condition where user want to copy file from one location to another location.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

Data Input Arguments

Required?

Description

Source File Path:

Destination Directory Path:

Destination File Name:

Overwrite:

Yes

Yes

Yes

Yes

Provide File Path

Provide Destination File Directory where you want to copy File

Provide Destination File Name(with extension or Without Extension)

If checked so Overwrite Existing file if not checked then not Overwrite Existing File

Output

True

If the keyword passes successfully

False

If there was an error

Positive Condition

Keyword Name

Input

Output

Status

CopyFile

SourceFilePath:‪C:UsersABCD.txt

Destination Directory Path:C:UsersUserNameDesktop

Destination File Name:EFGH

Overwrite:True

True

Pass

Error conditions

Don’t Provide Input Argument

Input

Output

Status

Error Message

Source File Path:‪

Destination Directory Path:

Destination File Name:

Overwrite:False

False

Fail

Argument Data Missing

Provide Destination Directory Path and Destination File Name which is not Exist.

Input

Output

Status

Error Message

Source File Path:‪C:UsersABCD.txt

Destination Directory Path:C:UsersUserNameD

Destination File Name:IJKL

Overwrite:False

Fail

Argument Data Invalid

CreateFile

This keyword is used to Create a File at the given Path.

It is used when you want to create any File at any location and it takes the Directory Path, Filename and Overwrite (Y/N).

Input Arguments

Object Input Arguments

Required?

Description

Object

NO

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

DirectoryPath

Yes

Specify the Path where File has to be created.

FileName

Yes

Specify the FileName from which name you want to Create File.

Overwrite

Yes

Select the checkbox as True or False

Note: If already any File with the same name exists at that location then you can Overwrite the file by selecting Checkbox.

Output

True

If the keyword passes successfully.

False

If there was an error.

Blank

If provide invalid path.

Example

If we want to Create any file at any particular location like in D: in folder Create folder then use the Keyword Create File and give valid path in DirectoryPath, Specify name of File in FileName from which name you want to create file and if want Overwrite any File then select checkbox or deselect checkbox.

Createfile

Object

< No Object Input Arguments is required. >

 

DirectoryPath

D:Create folder

FileName

Books

Overwrite

True

Error conditions

 

Conditions

Message

Debug Information

If provide Invalid Path

< Argument Data Invalid (-13300) >

System.ArgumentException: Please provide absolute path name at A.cdb4381.c7ad1535d27337

(String cdb7, String ca5989, Boolean c259643)

in File681:line 218

If provide Null Path

< Argument Data Missing (-13200) >

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

If File Already Exist

< Argument Data Invalid (-13300) >

File Already Exist

DeleteFile

This keyword is used to Delete a File from a location. This keyword is used when you want to delete any File from any location. It takes values in FilePath and deleteFilePermanently. If select deleteFilePermanently i.e. True then it will delete file permanently and if do not select deleteFilePermanently  i.e. false then it will not delete file permanently.

File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

FilePath

Yes

Specify the Path from where File has to be deleted.

DeleteFilePermanently

Yes

Select checkbox

* True if want to delete file permanently

* Deselect checkbox i.e. False if do not want to delete file permanently.

Output

True

If the keyword passes successfully.

False

If there was an error.

Example

If we want to Delete any file from any particular location like in D: from folder “Create folder” then use the Keyword Delete File and give valid path in DirectoryPath and select check box in deletefilepermanently.

DeleteFile

Object

< No Object Input Arguments is required.>

FilePath

D:Create folderbooks.txt

deleteFilePermanently

True

Error conditions

 

Conditions

Message

Debug Information

If provide Invalid Path

< Argument Data Invalid (-13300) >

Not a Valid Path.

If provide Null Path

< Argument Data Missing (-13200) >

File Path argument is missing.

If File doesn’t exist

Argument Data Invalid (-13300)

Not a Valid Path.

GetCellValueFromExcel

This keyword is used to get the cell value of an excel file. It is used when you want to get cell value of an excel file. It takes ExcelFilepath, sheetName, rowNumber and columnNumber as input parameter. The File path should contain filename with .xls/.xlsx extension.

File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

ExcelFilepath

Yes

Specify the Path of file with csv extension from which you want to get value.

sheetName

Yes

Specify the sheetname of Excel file.

rownumber

Yes

Specify the Row number of the cell from where you want to get value.

columnnumber

Yes

Specify the Column number of the cell from where you want to get value.

Output

Value of Cell

If the keyword passes successfully.

False

If there was an error.

Example

If we want to get cell value from any particular Excel file “excel.xlsx” which is in folder Aishwarya in C: use this keyword as shown-

GetCellvaluefromExcel

Object

< No Object Input Arguments is required.>

ExcelFilepath

C:Usersaishwaryaexcel.xlsx

sheetName

Sheet1

rowNumber

1

columnNumber

1

Error conditions

Conditions

Message

Debug Information

If provide Invalid Path

< Argument Data Invalid (-13300) >

Sheet name sheet1 doesn’t exists.

If provide Null Path

< Argument Data Missing (-13200) >

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

If provide File which doesn’t exists

Argument Data Invalid (-13300)

Sorry, we couldn’t find C:UsersaishwaryaDesktopexcel.xls. Is it possible it was moved, renamed or deleted?

If do not provide sheet name

Argument Data Missing (-13200)

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

If provide invalid row and column number

Argument Data Invalid (-13300)

Invalid row or column

GetFileExtension

This keyword is used to fetch the extension of any specified File. It is used when you want to get the file extension of any file and it takes Path of the specified file with extension as input parameter. File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

Path

Yes

Specify the Path of file with extension

Output

Extension of file

If the keyword passes successfully.

False

If there was an error.

Example

If we want to get file extension of File test.html from C: then use the keyword GetFileExtension.

GetFileExtension

Object

< No Object Input Arguments is required. >

Path

C:test.html

It will get the Output “.html” i.e. extension of test.html file.

Error conditions

Conditions

Message

Debug Information

If the provided path is without extension

If provide Null Path

< Argument Data Missing (-13200) >

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

If provide path which do not exists

Argument Data Invalid (-13300)

System.IO.FileNotFoundException: Could not find a part of the path C:UsersaishwaryaDesktopdoc.doc

File name: ‘C:UsersaishwaryaDesktopdoc.doc’

at A.cdb444caf4f5ad03e34dc7fb63812

7381.c1025fe81511a868364fbb0c6e

6f996b9(String c81276ea65115095562f9860658

a83374) in File681:line 257

GetFileName

This keyword is used to fetch the file name with extension of any specified File. It is used when you want to get the name of any file with extension and it takes Path of the specified file.

File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

Path

Yes

Specify the Path of file of which you want to get the filename with extension.

Output

Name of file with extension

If the keyword passes successfully.

False

If there was an error.

Example

If we want to get filename with extension of File test.html from C: then use the keyword GetFileName

GetFileName

Object

< No Object Input Arguments is required.>

Path

C:test.html

It will get the Output “test.html” i.e. filename with extension of “test.html” file.

Error conditions

Conditions

Message

Debug Information

If provide path without extension

If provide Null Path

< Argument Data Missing (-13200) >

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

If file doesn’t exists

Argument Data Invalid (-13300)

System.IO.FileNotFoundException: Could not find a part of the path C:UsersADesktopdoc.doc

File name: ‘C:UsersaishwaryaDesktopdoc.doc’

at A.cdb444caf4f5ad03e34dc7fb

638127381.c71b75821a828d689d

c331e07040f3abb(String c81276ea65115095562f9860658a

83374) in File681:line 14

GetFileNameWithoutExtension

This keyword is used to fetch the file name without extension of any specified File. It is used when you want to get the name of any file without extension and it takes Path of the specified file.

File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

Path

Yes

Specify the Path of file of which you want to get the filename.

Output

Name of file

If the keyword passes successfully.

False

If there was an error.

Example

If we want to get filename of File test.html from C: then use the keyword GetFileNamewithoutExtension.

GetFileNamewithoutExtension

Object

< No Object Input Arguments is required.>

Path

C:test.html

It will get the Output “test” i.e. filename of “test.html” file.

Error conditions

Conditions

Message

Debug Information

If provide path without extension

If provide Null Path

< Argument Data Missing (-13200) >

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

If provide file which do not exists

Argument Data Invalid (-13300)

System.IO.FileNotFoundException: Could not find a part of the path C:UsersaishwaryaDesktopdoc.doc

File name: ‘C:UsersaishwaryaDesktopdoc.doc’

at A.cdb444caf4f5ad03e34dc7fb6381

27381 .c79f01309a5b360dea40b4a5ce9fa

05dc (String c81276ea65115095562f9860658

a83374) in File681:line 196

GetFilePath

This keyword is used to fetch the path of the specified File. This keyword is used when you want to get the path of any file and it takes the specified file. File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

Path

Yes

Select the file.

Output

Path

If the keyword passes successfully.

False

If there was an error.

Example

If we want to get the Path of File OpKey.txt from C: then use the keyword as shown-

GetFileSize

Object

< No Object Input Arguments is required. >

Path

C:UsersabcAppDataLocalAttachmentsOpKey.txt

It will return the Output “C:UsersabcAppDataLocalAttachmentsOpKey.txt” i.e. file path of “OpKey.txt” file.

Error conditions

Conditions

Message

Debug Information

If No file is provided

< Argument Data Missing (-13200) >

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

GetFileSize

This keyword is used to fetch the file size of any specified File. It is used when you want to get the size of any file and it takes Path of the specified file. File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

Path

Yes

Specify the Path of file of which you want to get the size.

Output

Size of file

If the keyword passes successfully.

False

If there was an error.

Example

If we want to Get Size of File test.html from C: then use the keyword as shown-

GetFileSize

Object

< No Object Input Arguments is required.>

Path

C:test.html

It will get the Output “563KB” i.e. file size of “test.html” file.

Error conditions

Conditions

Message

Debug Information

If provide Null Path

< Argument Data Missing (-13200) >

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

If file doesn’t exists

Argument Data Invalid (-13300)

System.IO.FileNotFoundException: Could not find a part of the path C:UsersNew Text Document

File name: ‘C:UsersText Document’

at A.cdb4 in File681:line 174

GetValueFromCSV

This keyword is used to get value from a CSV file. It is used when you want to get value of any CSV file. It takes CSVFilepath, rowNumber and columnNumber as input parameter. The File path should contain filename with .csv extension.

File path can be provided as static value or through Global variable and Attachment in Input Argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

No Object Input Arguments is required.

Data Input Arguments

Required?

Description

CsvFilepath

Yes

Specify the Path of file with csv extension from which you want to get value.

rownumber

Yes

Specify the Row number from where you want to get value.

columnnumber

Yes

Specify the Column number from where you want to get value.

Output

Value of  CSV File

If the keyword passes successfully.

False

If there was an error.

Example

If we want to get value from any particular CSV file “._FL_insurance_sample.csv” which is in Folder ‘aishwarya’ in C: then use keyword as shown-

GetvaluefromCSV

Object

< No Object Input Arguments is required.>

CSVFilePath

C:Usersaishwarya._FL_insurance_sample.csv

rownumber

1

columnnumber

1

Error conditions

Conditions

Message

Debug Information

If provide Invalid Path

< Argument Data Invalid (-13300) >

CSVFile path should contain file name with .csv extension

If provide Null Path

< Argument Data Missing (-13200) >

File Path argument is missing.

If Given File doesn’t exists

Argument Data Invalid (-13300)

File not found ‘C:UsersUsername

Desktop._FL_insurance_sample.csv’

If provide invalid row and column

Argument Data Invalid (-13300)

Minimum value for Row and Column is 1

ReadTextFile

This keyword is used to read a given file (File path should contain the file name with .txt file extension). It takes FilePath as data input argument.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

File Path

Yes

Provide the full file path.

Note: File must have .txt extension.

Output

 

Mapped file having .txt file extension

If the keyword passes successfully

Mapped file having other than .txt file extension.

If an error is there

Example

This keyword is mostly used in situations where you want to read text written in the given text file.

Common Error conditions

Scenarios

Error Message

Debug Information

If mapped file have other than .txt file extension

Argument Data Invalid

Given file is not a txt file

RenameFile

This keyword is used to rename a specified file. It takes FilePath and NewFileName as data input arguments.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments