Changelog
v0.16.2 (2017-6-27)
onChange
event in latest React versions. (#1558)value
property setters of HTMLInputElement
and HTMLTextAreaElement
prototypes are now saved. (testcafe-hammerhead/#1185)name
and namedItem
methods of an HTMLCollection
are now marked as non-enumerable. (testcafe-hammerhead/#1172)length
property runs faster. (testcafe-hammerhead/#979)Changelog
v0.16.1 (2017-6-21)
meta[rel="import"]
is now processed. (testcafe-hammerhead/#1161)MutationObserver
. (testcafe-hammerhead/#1178)innerHtml
property is no longer processed for elements that don't have this property. (testcafe-hammerhead/#1164)Changelog
v0.16.0 (2017-6-13)
TypeScript support, seamless testing in headless Chrome and device emulator, and numerous bug fixes.
Changelog
v0.15.0 (2017-4-26)
Plugins for React and Vue.js, TestCafe Docker image, support for Internet access proxies and lots of bug fixes.
We have changed the way the withText method behaves when it is called in a chain.
const el = Selector('div').withText('This is').withText('my element');
In previous versions, this selector searched for a div
with text my element
because the second call to withText
overrode the first one.
Now this code returns an element whose text contains both This is
and my element
as the second call compounds with the first one.
In this release cycle, we have created a plugin for testing React applications. This plugin allows you to select React components by their names.
import ReactSelector from 'testcafe-react-selector';
const TodoList = ReactSelector('TodoApp TodoList');
const itemsCountStatus = ReactSelector('TodoApp div');
const itemsCount = ReactSelector('TodoApp div span');
And it enables you to get React component's state
and props
.
import ReactSelector from 'testcafe-react-selector';
fixture `TODO list test`
.page('http://localhost:1337');
test('Check list item', async t => {
const el = ReactSelector('TodoList');
await t.expect(el.getReact().props.priority).eql('High');
await t.expect(el.getReact().state.isActive).eql(false);
});
To learn more, see the testcafe-react-selectors repository.