【发布时间】:2021-06-02 23:03:48
【问题描述】:
element.getAttribute('value') 在 Protractor 中返回 null,尽管在源代码中存在值详细信息。
下面是我的代码,
console.log(await this.textArea.getAttribute('value'));
我阅读了有关同一问题的其他帖子,但这些都是旧的,没有解决方案对我有用。我还尝试使用 browser.actions().click(element).sendKeys('input').perform(); 输入输入考虑可能是 sendKeys() API 问题,但仍然没有运气。
直到 2021 年 6 月 1 日,相同的代码“element.getAttribute('value')”一直运行良好,但突然返回空值,不确定是否有任何代码更改或编译器版本需要更新?
【问题讨论】:
标签: protractor