-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Hi!
I have tried to extend ElemetFinder and override it's "click" method, but when i call element.click() in my test scenario default ElementFinder click() event is fired. Here is the example of my code below.
`export default class ElementDecorator extends BaseFragment {
protected logger = CustomLogger.get('ElementDecorator');
constructor(elementFinder: ElementFinder) {
super(elementFinder);
}
public async click(): Promise {
this.logger.info('my click');
await this.scrollIntoView();
await WaitUtils.waitForClickable(this);
await super.click();
}
}
export default class MyPageObjectClass {
private myButton: ElementDecorator;
constructor() {
this.myButton= new ElementDecorator($(#button));
}
public async clickMyButton() {
this.logger.info('Clicking my button');
await this.myButton.click();
}
}`
"protractor": "5.4.2",
"typescript": "3.4.1"