我正面临着量角器测试的一些奇怪问题.我使用以下代码来获取元素的文本.
getTitleElementValue(): Promise<string> {
return this.getTitleElement().getAttribute('value')
}
Run Code Online (Sandbox Code Playgroud)
一切顺利,直到我把我的代码推到git.我立刻拉了最新的代码,然后我收到了错误
Type 'promise.Promise<string>' is not assignable to type 'Promise<string>'
Run Code Online (Sandbox Code Playgroud)
我对输出感到困惑,需要一些关于这个问题的输入.我想提供任何其他细节.下面是package.json
{
"name": "ris-beta",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"generate:proxy": "node config/proxy.js",
"start": "npm run generate:proxy && ng serve --ssl true --ssl-key config/ssl/localhost.key --ssl-cert config/ssl/localhost.crt --proxy-config proxy.conf.json --host=0.0.0.0",
"start:http": "npm run generate:proxy && ng serve --proxy-config proxy.conf.json --host=0.0.0.0",
"test": "ng test --watch=false",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor",
"lint": "ng lint --type-check",
"deploy": "npm run test && npm …Run Code Online (Sandbox Code Playgroud)