I tried to define custom element that inherits faltest Element:
const { Element: _Element } = require('@faltest/page-objects');
class Element extends _Element {
async foo() {
await super.click();
await ...;
}
}
And then I tried to use it in my code:
...
button: create(
'[data-test-my-button]',
),
...
click: async() => {
await pageObject.button.foo();
}
...
But this ends with:
TypeError: pageObject.button.foo is not a function
I tried to define custom element that inherits faltest
Element:And then I tried to use it in my code:
But this ends with: