我无法从网址中自动点击 ShowDates 按钮。
我正在尝试阅读web元素(通过按钮id / class),如下所示
let SHOW_DATES_BUTTON = By.css('.btn-secondary.btn-sub-action.show-dates-button');
async ShowDatesButton(){
return await this.baseClassWebDriver.wait(Until.elementsLocated(SHOW_DATES_BUTTON));
}
async go(){
let demoSRPage = new DemoSRPage(this.url, this.baseClassWebDriver);
await demoSRPage.go().then(async () => {
await demoSRPage.showDatesButton().then(async (showDateBtn) => {
await showDateBtn.click().then(async () => {
pause(20000);
await demoSRPage.getLastHandle(demoSRPage.baseClassWebDriver);
});
});
});
}
我收到错误:showDateBtn.click() is not a function
有人可以帮助我吗