I want to do something every time I click an element.
So when I call click
I.click(locator);
Instead of calling webdriver click function, I want it to call my override which I've added to steps_file.js
click(locator){
// do something first
console.log('something');
// finally click the element
this.helpers["WebDriverIO"].browser.click(locator);
}
I've got 2 problems:
- My click function is getting ignored. It still clicks the element normally. I don't see any log "something"
- steps_file.js doesn't seem to have access to helpers. this.helpers is undefined