I have a problem with webdriverIO v7, i'm trying to select the same component in different stages of the flow. The first time i can click on the button, but the second time i can't, have you any idea about this issue I'm using an application developed in React
This is the spec
await DiscoverPage.clickOnTakeALook();
await PropertyDetailsPage.switchToTab();
await PropertyDetailsPage.clickOnBtnReservePropertyDetails();
await CheckoutPage.selectTypeOfStay();
await CheckoutPage.selectGuest();
await CheckoutPage.clickOnBtnContinue();
await CheckoutPage.setValueInStayRequeriments();
await CheckoutPage.clickOnBtnContinue();
const textPaymentMethods = await
CheckoutPage.getTextPaymentsMethods();
expect(textPaymentMethods).toEqual('Payment Methods');
});
This is the button and the function where i use it
get btnContinue() {
return $('[data-testid="btnContinue"]');
}
async clickOnBtnContinue() {
await this.btnContinue.waitForDisplayed({ timeout: 30000 });
await this.btnContinue.waitForClickable({ timeout: 30000 });
await this.btnContinue.click();
}