Angular量角器e2e mat-radio-group innerText迭代函数错误

Angular Protractor e2e mat-radio-group innerText iteration function error

clickOnQuestionsRadioButton(buttonName) {
    const matRadioButtonList = $$('mat-radio-group > mat-radio-button');
    const question_btn = matRadioButtonList.filter(elem => {
      return elem.getInnerText().then(text => {
        console.log(text);
        return text.toLowerCase().includes(buttonName.toLowerCase());
      });
    }).first().all(by.cssContainingText('innerText', buttonName));
    question_btn.click();
  }

clickOnQuestionsRadioButton('AEP');

错误: TypeError: elem.getInnerText 不是一个函数

而不是 getInnerText() 使用 getText()

getInnerText() Protractor API 中不存在函数。