Currently, I am utilizing WebdriverIO in combination with CucumberJS for testing purposes. The following code functions correctly in Firefox; however, I encounter errors in Chrome which display element is not clickable
. I am seeking a solution using JavaScript.
this.Then('I click on View Coupon Details button on a random coupon', () => {
const randomElement = getRandomIndex(couponsCount);
assert.ok(coupons.value[randomElement].element('.print-coupon').click('a'));
});
coupons
represents an array of WebElements
. My objective is to click on the View Coupon detail button.
https://i.sstatic.net/46LLi.jpg
Sample Page:
Thank you,
Vinod