How to set TESTAR with Webdriver protocol

From Testar
Jump to navigation Jump to search

Usage of TESTAR WebDriver

The webdriver version of TESTAR is developed to better handle web applications. For various reasons, the desktop version doesn't recognize the non-native widgets available in websites. TESTAR webdriver tries to remedy this by looking at the DOM and adding a (JS) web extension to the browser. An additional advantage is the fact that it is safe to run the webdriver version 'natively', i.e. it is not necessary to run TESTAR webdriver in a VM.

The webdriver version of TESTAR is tested on 3 mayor platforms : Windows 10, OS X and Linux. It has been tested with Chrome/Chromium, Firefox and Edge (Windows). That said, using Chrome seems to be the most performant option.

Advanced configuration for webdriver protocol

SUT web domain (domainsAllowed and followLinks)

While testing web applications, it is desirable to keep the testing on the same domain. Many applications have links pointing to domains outside the scope. When the browser reaches a domain not defined in domainsAllowed it will try to go back to the last allowed page. Related to this is the followLinks option to follow links opened in new tabs or stay with the original tab.

Webdriver domains allowed.png
Webdriver follow link.png


SUT clickable elements (clickableClasses)

While the webdriver tries to find all clickable elements on the page via the onclick attribute or eventlistener, this is not sufficient for certain web frameworks that use global eventlisteners. Global eventListeners use class attributes to determine the required actions when the element is clicked. The protocol allows the tester to add these attributes to clickableClasses.

Webdriver clickable classes.png


SUT denied extensions (deniedExtensions)

Because the webdriver is dependent on the use of the (Javascript) web extension, it fails when the browser encounters PDFs or images. With the deniedExtensions option the testar can deny these URLs.


Webdriver denied extensions.png


SUT login (login)

The login, username and password pairs allow TESTAR to automatically login on websites that need authentication. The first pair consists of the URL with the login and the id of the FORM. The next 2 items should contain the ids of the input fields with their credential values.

Webdriver login form.png


SUT policy popups (policyAttributes)

The last configurable item, policyAttributes, is a list of attribute names and values. When the deriveAction method finds all these name-value pairs on an element, a click action is forced. This is used to automate the removal of annoying policy popups.

Webdriver policy popups.png