1. Home
  2. Opkey Help
  3. 25. Opkey Keyword Documentation
  4. 25.5 Visual Plugin Keywords

25.5 Visual Plugin Keywords

PasteTextOnEditBox

This keyword will copy the text from clipboard and paste it on an EditBox object. It takes an EditBox object as Object input argument. This keyword is mostly used in situations where you want to copy any text from the clipboard and paste it on the EditBox.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image-based testing.

Input Arguments

Now an Input Argument is added of Match Score which will allow you to add your custom match score to pass or fail the Keyword while executing the run. The script will run unaltered if no Match Score is provided as the Input Value. Rest keywords will run as usual.

 

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes EditBox object as Object input argument. You can choose the EditBox object from your Object Repository on which you want to Paste Text from Clipboard.

Data Input Arguments

Required?

Description

Data

No

This keyword doesn’t take any data input argument.

Output

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Application

Comments

Opkey Admin

This keyword will copy the text from clipboard and paste it on an Editbox object.

In the above screenshot, if you want to Copy the Text “Williams” from the clipboard to the highlighted Edit Box object then here is how you will use this keyword:

PasteTextOnEditBox

Object

< Choose the Edit Box Object From OR >

  • Fetch the Edit Box Object “Username” and then capture its image by clicking on the icon. Save the Image property of the object and set its Tolerance Property. Check the Is Used checkbox only for Image and Tolerance property.

  • Click Save.
  • Note: You can also fetch objects by adding them manually.
  • Now an Input Argument is added of Match Score which will allow you to add your custom match score to pass or fail the Keyword while execution. The script will run unaltered if no Match Score is provided as the Input Value. Rest keywords will run as usual.
  • Open Notepad [clipboard] and write the content which you wish to copy on the edit box object. Press Ctrl + C and run the keyword.

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

DragDrop

This keyword will drag the first object onto the second object. It takes two objects as Object Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image-based testing.

Now an Input Argument is added of Match Score which will allow you to add your custom match score to pass or fail the Keyword while execution. The script will run unaltered if no Match Score is provided as the Input Value. Rest keywords will run as usual.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes two objects as Object input argument. You can choose any two objects from your Object Repository. The first object will get selected and will be dragged and will get dropped on to the second object.

Data Input Arguments

Required?

Description

Data

No

This keyword doesn’t take any data input argument.

Output

 

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Let the first object be Drag whose properties are fetched as follows:

Let the second object be Drop whose properties are fetched as follows:

Suppose you want to drag the first object onto the second object. Here is how you will use DragDrop keyword:

DragDrop

Object

< Choose two Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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, the output of a previous step, a global variable etc.; but it must not be left blank.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If an object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

DoubleClick

This keyword will double click on the specified object. It takes one object as Object Input arguments. It does not take any data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image-based testing.

Now an Input Argument is added of Match Score which will allow you to add your custom match score to pass or fail the Keyword while execution. The script will run unaltered if no Match Score is provided as the Input Value. Rest keywords will run as usual.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument. You can choose an object from your Object Repository on which you want to double click.

Data Input Arguments

Required?

Description

Data

No

This keyword does not require any Data Input Argument.

Output

True

If the keyword passes successfully

It does not display anything, If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

Suppose you want to double click on the object Obj1 . Here is how you will use DoubleClick keyword:

DoubleClick

Object

< Choose Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

SetImageUpScaleFactor

This keyword will find the ReferenceImage on the screen after trying (many) up-scaled versions of the ReferenceImage. This helps in scenarios when the zoom(or resolution) level of the AUT has changed from the original OR Object.

This keyword also remembers the scaling-factor and applies it to all further keywords of the same session until the ResetImageScaleFactor keyword is called. This keyword returns the scaling factor of the source Image wrt the Screen Image.

It takes one image object as Object Input arguments. It does not  take any  data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one image object as Object input argument.

Data Input Arguments

Required?

Description

Data

No

This keyword does not require any Data Input Argument.

Output

Scale Factor

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

URL

Comments

https://www.opkey.com/

Reference Image

1.jpg

AUT  Upscaled  Image

 

1.jpg

This keyword will find the highlighted image on the screen after trying  up-scaled versions.

Let there be an object Features whose properties are fetched as follows:

1.jpg

Suppose you have to run this keyword on Chrome where you have Zoomed the screen from 100% to 110%. In this case, SetImageUpScaleFactor  keyword will up-scale the image 10% in  order to match the object.

Here is how you will use SetImageUpScaleFactor  keyword:

SetImageUpScaleFactor

Object

< Choose an Image Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ReferenceImage’. Expected StaticValue was empty.

If object is provided but scaling of the image was not required

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Scaling factor was not found at the given time

WaitForObjectAppearance

This keyword will wait for the specified time till the specified object appears on the screen. It takes one object as Object Input arguments. It also  takes TimeOutInSeconds as data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument.

Data Input Arguments

Required?

Description

TimeOutIn

Seconds

Yes

Specify the Time in seconds.

Output

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

1.jpg

Suppose object Obj1 appears on the screen after hovering the mouse over the highlighted object [wrt to the screenshot below] .

URL

Comments

https://www.opkey.com/

1.jpg

This keyword will wait for 10 seconds till the object  Obj1 appears on the screen.

Here is how you will use WaitForObjectAppearance keyword:

WaitForObjectAppearance

Object

< Choose an Object From OR >

TimeOutInSeconds 10

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

WaitForObjectDisAppearance

This keyword will wait for the specified time till the specified object disappears on the screen. It takes one object as Object Input arguments. It also  takes TimeOutInSeconds as data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument.

Data Input Arguments

Required?

Description

TimeOutIn

Seconds

Yes

Specify the Time in seconds.

Output

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

1.jpg

Suppose object Obj1 disappears on the screen after hovering the mouse over the highlighted object [wrt to the screenshot below] .

URL

Comments

https://www.opkey.com/

1.jpg

This keyword will wait for 10 seconds till the object  Obj1 disappears on the screen.

Here is how you will use WaitForObjectDisAppearance keyword:

WaitForObjectDisAppearance

Object

< Choose an Object From OR >

TimeOutInSeconds 10

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

SetImageDownScaleFactor

This keyword will find the ReferenceImage on the screen after trying (many) Down-scaled versions of the ReferenceImage. This helps in scenarios when the zoom(or resolution) level of the AUT has changed from the original OR Object.

This keyword also remembers the scaling-factor and applies it to all further keywords of the same session until the ResetImageScaleFactor keyword is called. This keyword returns the scaling factor of the sourceImage wrt the Screen Image.

It takes one image object as Object Input arguments. It does not  take any  data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one image object as Object input argument.

Data Input Arguments

Required?

Description

Data

No

This keyword does not require any Data Input Argument.

Output

Scale Factor

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

URL

Comments

https://www.opkey.com/

Reference Image

1.jpg

AUT DownScaled Image

1.jpg

This keyword will find the highlighted image on the screen after trying  down-scaled versions.

Let there be an object Features whose properties are fetched as follows:

1.jpg

Suppose you have to run this keyword on Chrome where you have Zoomed the screen from 100% to 80%. In this case, SetImageDownScaleFactor keyword will Down-scale the image 10% in  order to match the object.

Here is how you will use SetImageDownScaleFactor  keyword:

SetImageDownScaleFactor

Object

< Choose an Image Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ReferenceImage’. Expected StaticValue was empty.

If object is provided but scaling of the image was not required

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Scaling factor was not found at the given time

Rightclick

This keyword will right click on the specified object. It takes one object as Object Input arguments. It does not take any data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument. You can choose an object from your Object Repository on which you want to Right click.

Data Input Arguments

Required?

Description

Data

No

This keyword does not require any Data Input Argument.

Output

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

Suppose you want to right click on the object. Here is how you will use RightClick keyword:

RightClick

Object

< Choose Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

Click

This keyword will click on the specified object. It takes one object as Object Input arguments. It does not take any data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument. You can choose an object from your Object Repository on which you want to click.

Data Input Arguments

Required?

Description

Data

No

This keyword does not require any Data Input Argument.

Output

True

If the keyword passes successfully

False

It does not displays anything, If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

Suppose you want to click on the object Obj1 . Here is how you will use Click keyword:

Click

Object

< Choose an Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

ResetImageScaleFactor

This keyword will Reset the Image Scale Factor to 1.0. It does not  take any  Object or data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This keyword doesn’t take any object input argument.

Data Input Arguments

Required?

Description

Data

No

This keyword doesn’t take any data input argument.

Output

 

True

If the keyword passes successfully

Example

URL

Comments

https://www.opkey.com/

 

1.jpg

This keyword will Reset the Image Scale Factor to 1.0.

Let there be an object Features whose properties are fetched as follows:

1.jpg

Suppose you have to run this keyword SetImageDownScaleFactor on Chrome where you have Zoomed Out the screen from 100% to 80%. In this case, If you want Reset the image back to original, then here is you can use ReSetImageScaleFactor  keyword which will Reset the Image Scale Factor to 1.0.

Common Error conditions

There are no error conditions for this keyword.

Hover

This keyword will hover the mouse on the specified object. It takes one object as Object Input arguments. It does not take any data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument. You can choose an object from your Object Repository on which you want to hover the mouse.

Data Input Arguments

Required?

Description

Data

No

This keyword doesn’t take any data input argument.

Output

 

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

Suppose you want to hover the mouse on the object Obj1. Here is how you will use Hover keyword:

Hover

Object

< Choose an Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

TypeTextOnEditBox

This keyword will Type the specified text on an Editbox object. It takes an Editbox object as Object input argument and Text to be typed as Data Input Argument.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes EditBox object as Object input argument. You can choose the EditBox object from your Object Repository on which you want to Paste Text from Clipboard.

Data Input Arguments

Required?

Description

Text

Yes

This keyword takes Text to be typed as Data Input Argument.

Output

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Application

Comments

Opkey Admin

This keyword will type the text on an Editbox object.

In the above screenshot, if you want to Type the Text “Williams” to the highlighted Edit box object then here is how you will use this keyword:

TypeTextOnEditBox

Object

< Choose the Edit Box Object From OR >

Text  Williams
  • Fetch the Edit Box Object “Username” and then capture its  image by clicking on the   icon. Save the Image property of the object and set its Tolerance Property. Check the Is Used checkbox only for Image and Tolerance property.

  • Click Save. 
  • Note: You can also fetch objects by adding them manually.

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

CompareImageObjects

This keyword shall try to compare the two image objects and return True if either of the image is found similar to the other one. It takes two image objects as Object Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes two image objects as Object input argument.

Data Input Arguments

Required?

Description

Data

No

This keyword doesn’t take any data input argument.

Output

True

If the two images matches with each other and If the keyword passes successfully

False

If the two images are not matched or If the Keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

1.jpg

Let there be an object Obj2 whose properties are fetched as follows:

1.jpg

Suppose, you want to compare object Obj1 and Obj2 then, here is how you will use CompareImageObjects keyword:

CompareImageObjects

Object

< Choose any two Image Objects From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If the two images are not matched with each other.

Images matched by visual but pixel-by-pixel matching score was: 0.0

VerifyObjectExists

This keyword will verifies the existence of an object through an image. It takes one object as Object Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument.

Data Input Arguments

Required?

Description

Data

No

This keyword doesn’t take any data input argument.

Output

 

True

If the keyword passes successfully

False

If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

1.jpg

Suppose You wish to verify the existence of this object then, here is how you will use VerifyObjectExists keyword:

VerifyObjectExists

Object

< Choose an Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If an object which exists on web is provided without using Open Browser keyword.

Verification Failed (-16100)

DESCRIPTION:

The value which is required, was not found on the currently active page or view.

Object Does not Exists

CompareImages

This keyword will compare the two images and return True if either of the image is found on the other one.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This Keyword does not take any Object input argument.

Data Input Arguments

Required?

Description

Image Path

Yes

Specify the path of the image. You can compare two images at a time.

Note: Image paths of two images are given.

Output

True

If the two images matches with each other and If the keyword passes successfully

False

If the two images are not matched or If the Keyword fails

Example

Suppose you want to compare two images then,here is how you will use CompareImages keyword:

CompareImages

Common Error conditions

Scenarios

Error Message

Debug Information

When the two images does not match with each other

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.

Invalid file path:

when blank 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.

Invalid file

path:

CountAllMatchingObjects

This keyword will return the number of matching objects on the screen. It takes one object as Object Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument.

Data Input Arguments

Required?

Description

Data

No

This keyword doesn’t take any data input argument.

Output

Count of the number of matching objects

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Application

Comments

Opkey Agent

1.jpg

This keyword will count the number of matching objects on the screen

Let there be an object Obj1 whose properties are fetched as follows:

1.jpg

Suppose You wish to calculate the number of matching objects on the screen. then, here is how you will use CountAllMatchingObjects keyword:

CountAllMatchingObjects

Object

< Choose an Object From OR >

Output : 7

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

ReadTextFromImagePath

This keyword will apply OCR [optical character recognition] techniques to read Text from the specified Image. It takes Image Path as Data Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This Keyword does not take any Object input argument.

Data Input Arguments

Required?

Description

Image Path

Yes

Specify the Image Path whose Text has to be fetched.

Output

 

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Image

Comments

Opkey Agent.jpg

1.jpg

This keyword will fetch the Text of the given image.

Suppose You wish to fetch the Text of the Image, then, here is how you will use ReadTextFromImagePath keyword:

ReadTextFromImagePath

Note:  The image should be in the jpg format.

Output:

Settings

Settings

Settings

Common Error conditions

Scenarios

Error Message

Debug Information

If  blank 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.

Invalid File Path

If 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.

Invalid File Path

OverlayImagesObjectBased

This keyword will splits two image into multiple small Images, compares each small Image and check for the mismatches based on the Object and  Data Input Arguments provided.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes two Objects as the Object Input argument.

Data Input Arguments

Required?

Description

Should Overlay Images

Yes

Specify whether or not the Output image should be Overlayed on the baseline image or kept side by side.

It is a checkbox which should be checked for True condition and unchecked for False Condition.

Number of rows

Yes

Specify the Number of rows the Images will be splitted for Comparison

Number of Columns

Yes

Specify the Number of Columns  the Images will be splitted for Comparison

Output

Number of

unmatched Cells

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Let there be an object Obj1 whose properties are fetched as follows:

1.jpg

Let there be an Object Obj2 whose properties are as follows:

2.jpg

 Suppose You wish to splits two images into multiple small Images, compares each small Image and check for the mismatches,  then here is how you will use OverlayImages_ObjectBased keyword:

OverlayImages_ObjectBased

Should Overlay   

 Images

False

Number of

rows

5

Number of

Columns

5

When the Should Overlay  Images is “False” then the screenshot will be as follows:

1.jpg

When the Should Overlay  Images is “True” then the screenshot will be as follows:

2.jpg

Output

25

Common Error conditions

Scenarios

Error Message

Debug Information

If no Object 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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If Blank 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.

Data not provided for argument: ‘BaselineImage’. Expected StaticValue was empty.

OverlayImages

This keyword will splits two images into multiple small Images, compares each small Image and check for the mismatches based on the Object and  Data Input Arguments provided.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This Keyword does not require any  Objects as the Object Input argument.

Data Input Arguments

Required?

Description

BaseLine Image Path

Yes

Specify the Path of the image which is considered to be the Baseline
Test Image Path Yes Specify the Path of the image which will be compared with the Baseline

Should Overlay Images

Yes

Specify whether or not the Output image should be Overlayed on the baseline image or kept side by side.

It is a checkbox which should be checked for True condition and unchecked for False Condition.

Number of rows

Yes

Specify the Number of rows the Images will be splitted for Comparison

Number of Columns

Yes

Specify the Number of Columns  the Images will be splitted for Comparison

Output

Number of

unmatched Cells

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Suppose You wish to splits two images into multiple small Images, compares each small Image and check for the mismatches,  then here is how you will use OverlayImages keyword:

OverlayImages

When the Should Overlay  Images is “False” then the screenshot will be as follows:

1.jpg

When the Should Overlay  Images is “True” then the screenshot will be as follows:

1.jpg

Output

12

Common Error conditions

Scenarios

Error Message

Debug Information

If invalid Baseline image path is provided

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched.

Baseline Image Path Not found.

If Blank 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

Data not provided for argument: ‘BaselineImage’. Expected StaticValue was empty.

ReadTextFromScreenCoordinates

This keyword will apply OCR [optical character recognition] techniques to read Text from the specified coordinates of the Screen based on the Data Input Arguments provided.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This Keyword does not require any  Objects as the Object Input argument.

Data Input Arguments

Required?

Description

X

Yes

Specify the X co-ordinates of the screen
Y Yes Specify the Y co-ordinates of the screen

Width

Yes

Specify the Width of the Screen

Height

Yes

Specify the Height of the Screen

Output

Text of the Screen

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Let the screen be as follows:

1.jpg

Suppose You wish to read the Text displayed on the screen,  then, here is how you will use ReadTextFromScreenCoordinates keyword:

ReadTextFromScreenCoordinates

X

504
Y 60

Width

1766

Height

850

Output:

Upcoming Movies in 2018

Common Error conditions

Scenarios

Error Message

Debug Information

If 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.

Argument(s) X; Y; Width;Height is/are Invalid.

If Blank 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.

Argument(s) X; Y; Width;Height is/are Blank 

FindMatchingObjects

This keyword will find a matching object through an image on the screen. It takes one object as Object Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one object as Object input argument.

Data Input Arguments

Required?

Description

Data

No

This Keyword does not take any Data input argument.

Output

True

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Application

Comments

Opkey Agent

1.jpg

This keyword will find a matching object through an image on the screen.

Let there be an object Obj1 whose properties are fetched as follows:

1.jpg

Suppose You wish to find a matching objects on the screen. then, here is how you will use FindMatchingObjects keyword:

FindMatchingObjects

Object

< Choose an Object From OR >

Common Error conditions

Scenarios

Error Message

Debug Information

If  no object is given

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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

If object is provided without its image and tolerance property

Object Not Found (-11100)

DESCRIPTION:

The object on which an action was supposed to be performed, was not found on the currently active page or view. This happens when the page is not properly loaded or the properties of the object are not exactly matched

Argument Data Missing

ReadTextFromScreen

This keyword will apply OCR [optical character recognition] techniques to read Text from the whole Screen. It does not  take any  Data or Object Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

No

This Keyword does not require any  Objects as the Object Input argument.

Data Input Arguments

Required?

Description

Data

No

This Keyword does not take any Data Input argument.

Output

Text of the Screen

If the keyword passes successfully

Example

Let the screen be as follows:

1.jpg

Suppose You wish to read the Text displayed on the screen,  then you can use ReadTextFromScreen keyword:

Output:

Upcoming Movies in 2018

Common Error conditions

There are no error conditions for this keyword.

ReadTextFromImage

This keyword will apply OCR [optical character recognition] techniques to read Text from the specified Image. It takes an Image Object as Object Input arguments.

Note: Visual Specific keywords works on the image and tolerance property of the object and are used for image based testing.

Input Arguments

Object Input Arguments

Required?

Description

Object

Yes

This Keyword takes one Image object as Object input argument.

Data Input Arguments

Required?

Description

Data

No

This keyword does not require any Data Input Argument.

Output

Text of the Image

If the keyword passes successfully

It does not displays anything, If the keyword fails

Example

Image

Comments

Img.jpg

1.jpg

This keyword will fetch the Text of the given image.

Let there be an Object Obj1 which has the following properties:

1.jpg

The Tolerance Property of the Selected Image Object is set as 0.7 so that the Text of the image can be easily read.

Suppose You wish to fetch the Text of the Image [Img.jpg], then, here is how you will use ReadTextFromImage Keyword

ReadTextFromImage

Object

< Choose an Image Object From OR > Here, Obj1

Note:

The image should be in the jpg format.

Output:

Error Message

Common Error conditions

Scenarios

Error Message

Debug Information

If the Image provided does not have any Text

Text Not Found (-11300)

DESCRIPTION:

No object could be located on the currently active page/view with the matching text. This happens mostly when the page is not properly loaded or the view is not properly rendered. It might happen with a misspelled argument to the keyword.

No Text Found in Image

If no Object 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.

Data not provided for argument: ‘ImageObject’. Expected StaticValue was empty.

Was this article helpful to you? Yes No