gpt4 book ai didi

javascript - 无法读取未定义的属性 'sendKeys'

转载 作者:行者123 更新时间:2023-11-29 21:28:51 26 4
gpt4 key购买 nike

您好,我已经在 login-page.js 中编写了这段代码

enter image description here

我不知道为什么会出现错误
失败:无法读取未定义的属性“sendKeys”

我在 login_spec.js 上调用了这个页面

enter image description here

我无法在 Protractor 测试中继续这个

最佳答案

您应该使用 this 而不是 login_page 来引用当前页面对象:

this.login = function (username, password) {
this.userInput.sendKeys(username);
// ...
};

关于javascript - 无法读取未定义的属性 'sendKeys',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36866356/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com