17.4 Selenium JS Keywords

AccessibilityCheckPointsSettings

Accessibility Testing is a subset of Usability Testing and it is performed to ensure that the application being tested is usable by people with disabilities like hearing, color blindness, old age and other disadvantaged groups.

This keyword sets the prerequisites for Accessibility Test. It takes the report name of the Accessibility Test and the location where the Accessibility Report of a page after creation will be stored.

It will check the Accessibility of the current page and will generate the Accessibility Report of that particular page at the location or path given by the user.

Input Arguments

Output

Example

Suppose you want to sets the prerequisites for Accessibility Test then, here is how you will use AccessibilityCheckPointsSettings keyword.

AccessibilityCheckPointsSettings

Common Error conditions

SetViewPort

This keyword sets the Page Layout according to the given dimensions. It is basically used to open any website/browser in the Mobile View.

Input Arguments

Output

Example

Suppose you want to set the Page Layout according to the given dimensions, then you can use SetViewPort keyword as follows:

SetViewPort

Browser with Width “412” & Height “732”

Common Error conditions

ValidatePageAccessibility

This keyword validates the Page Accessibility at run time and will generate an Accessibility Report which contains the required page Accessibility.

Input Arguments

Output

SampleAccessibilityReport

Common Error conditions

There are no error conditions for this keyword.

VisualCheckPointsForObjects

This keyword takes the objects and test the location of the objects relatively to each other on a page. This keyword creates and compare different layout among different objects.

This keyword will take minimum of 10 objects.

Input Arguments

Output

Example

Suppose you want to takes the objects and test the location of the objects relatively to each other on a page then, here is how you will use VisualCheckPointsForObjects keyword.

VisualCheckPointsForObjects

You can find the Values of the Data Input Arguments as follows:

SpecName

SpecFolderPath

SampleVisualQAReport

Common Error conditions

VisualCheckPointsForPage

VisualCheckPointForPage keyword is basically used to compare a page with the already captured same page at runtime.

This keyword compares the page image by breaking image into given numbers of rows and columns.

This keyword when run for the first time will capture the current page snapshot and then the snapshot  will be compared with the same page when it will run for the second time. If there will be any differences, it will highlight the area of differences.

Input Arguments

Output

Example

Suppose you want to compare a page with the already captured same page at runtime then, here is how you will use VisualCheckPointForPage keyword.

VisualCheckPointForPage

Common Error conditions

There are no error conditions for this keyword.

VisualCheckPointSetting

This keyword sets prerequisites for the Visual QA. It takes the required settings need to perform the Visual QA on responsive websites.

Input Arguments

Output

Example

Suppose you want to sets prerequisites for the Visual QA then, here is how you will use VisualCheckPointSetting keyword.

VisualCheckPointSetting

You can find the Values of the Data Input Arguments as follows:

Common Error conditions

LoadSeleniumJS

This keyword is used to load the OpKey Selenium-JS plugin at runtime which is to be used for the Test Execution. This keyword is generally used when you have a Test Case which has all Generic keywords along with few Selenium-JS keywords which are Selenium-JS specific. This keyword is doesn’t take any object or data input argument.

Scenario:

Suppose there is a Test Case which has both mobile & web test steps. In such case, you need to load both plugins (OpKey Mobility & Selenium-JS plugins) at runtime so that they can be used for executing respective test steps, as required.

You need to add this keyword (LoadSeleniumJS) with a test step, just before stating the Web flows. Save the test case and then click on Run Now. It will take few moments to load the required plugins (as per the added test steps). There will be a popup message regarding the loaded plugins which will be used for executing the test case.

Input Arguments

Output

Error Conditions

Example

Contact us