Vaadin TestBench is part of the Vaadin platform and is intended to primarily be used to test applications created using the same platform version.
While the features are primarily the same as in TestBench 5 for Vaadin Framework 8 and TestBench 4 for Vaadin Framework 7, the API has been tuned a bit to better match Flow component API and features.
The ElementQuery method
caption(String) has been removed as there is no generic
caption concept across all web components. The method
state(String,String) was also tied to the Vaadin Framework "shared state" feature and has been removed. A more generic finder method
attribute(String name, String value) has been added instead. This can be used to find an element with any given attribute value. The old
caption("OK") can in some cases be replaced by
state("something","value") also by
attribute("something", "value"), depending on the used component.
The query methods
$$() were rarely used and have been removed to simplify the query language.
The Element API has been made consistent with the API provided by the element (web component) itself. The feature set is largely the same as in older versions but the exact method naming differs in some cases.
If you have an application which is using both a Vaadin Framework version and a Vaadin platform version, you should keep the tests for each version in a separate module in the project. This allows you to use an older TestBench version for the Vaadin Framework tests and a new version for the Vaadin platform tests.
The Selenium version has been upgraded to the latest available version. While it is mostly compatible, some small API changes might require your attention.
It is no longer recommended to use PhantomJS for headless testing. PhantomJS is lacking behind the latest browser versions in features and will in many cases just not work with Vaadin platform. You should instead run using headless Chrome (using
--headless --disable-gpu) or using headless Firefox (using