Testcafe Selector for UI5
npm install ui5-testcafe-selector$ npm install ui5-testcafe-selector --save-dev
js
import { UI5Selector } from "ui5-testcafe-selector";
//[...]
await t.click(UI5Selector("cbType-arrow"));
`
With Complex Properties (for all examples, check the chrome plugins, or the provided auto complete of visual studio code):
`js
import { UI5Selector } from "ui5-testcafe-selector";
//[...]
await t.click(UI5Selector({ "parentL3": { "identifier": { "ui5Id": "cbType" } }, "property": { "key": "04" } }));
`
$3
Use the getUI5 Function to retrieve client information, to be asserted on. Here as an example, the selectedKeye property.
`js
import { UI5Selector } from "ui5-testcafe-selector";
//[...]
await t.expect(UI5Selector("cbType").getUI5(({ element }) => element.property.selectedKey)).eql('04');
`
Run Tests
Use the standard testcafe cli. Example:
$ testcafe chrome test_file.js`