Skip to main content
Skip table of contents

XNAT Versioning

Obviously enough, XNAT changes from version to version. In order for the NRG_Selenium framework to deal with XNAT changing, we need to know what version of XNAT we're dealing with. To this end, the property xnat.version must be set in XNAT properties, described here: Setup and Configuration. Currently supported out-of-the-box are the options 1.7 and 1.6dev. The way this works is via the XNATUtils abstract class. For a given version of XNAT, you can extend this class and override any methods necessary to change the way Selenium interfaces with XNAT. One method of particular interest is the abstract method customize(). This method will be called exactly once in the @BeforeSuite phase of the tests (see Test Structure for more information). This method is useful to override selectors in XNATLocators. Another method of interest is getProhibitedTests(). This method should return a non-null List of Strings. When the tests are initialized, if any @Test method in the list of tests to be run has a name equal to any String in the List, the @Test will be prevented from running. This is useful to block certain tests from running in versions of XNAT incompatible with them.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.