0

我正在尝试验证一个元素不存在。但是当我这样做时:

await waitFor(element(by.label('Erro'))).toNotExist().withTimeout(800);
await expect(element(by.label('Erro'))).toNotExist();

我收到“错误:超过 240000 毫秒的超时。对于异步测试和挂钩,请确保调用了“done()”;如果返回 Promise,请确保它已解决。”

排毒:5.10.0 节点:5.6.0 设备:iPhone 6s plus(模拟器) Xcode:9.2 macOS:Sierra 10.12.6

设备和详细排毒日志

排毒动词 ws 发送:{"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"Invocation", "value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation", "value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString", "value":"Saldo de conta-corrente"}]}}]}},"method":"atIndex:","args":[{"type":"NSInteger","value":0}]}},"method":"performAction:","args":[{"type":"Invocation","value":{"target":{"type": "Class","value":"GREYActions"},"method":"actionForTap","args":[]}}]},"messageId":10}
排毒动词 ws onMessage: {"type":"invokeResult ","messageId":10,"params":{"result":"(GREYElementInteraction)"}}
排毒动词 wsactionForTap","args":[]}}]},"messageId":10}排毒动词 ws onMessage: {"type":"invokeResult","messageId":10,"params":{"result":" (GREYElementInteraction)"}}排毒动词 wsactionForTap","args":[]}}]},"messageId":10}排毒动词 ws onMessage: {"type":"invokeResult","messageId":10,"params":{"result":" (GREYElementInteraction)"}}排毒动词 ws
排毒动词 ws 发送:{"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"Class", "value":"GREYCondition"},"method":"detoxConditionForNotElementMatched:","args":[{"type":"Invocation","value":{"target":{"type":"EarlGrey", "value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class", "value":"GREYMatchers"},"method":"detoxMatcherForBoth:and:","args":[{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString", "value":"Erro"}]}},{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method ":"matcherForNotNil","args":[]}}]}}]}}]}},"method":"waitWithTimeout:","args":[{"type":"CGFloat","value" :0.8}]},"messageId":11}"args":[{"type":"NSString","value":"Erro"}]}},{"type":"Invocation","value":{"target":{"type":"类","值":"GREYMatchers"},"method":"matcherForNotNil","args":[]}}]}}]}}]}},"method":"waitWithTimeout:","args" :[{"type":"CGFloat","value":0.8}]},"messageId":11}"args":[{"type":"NSString","value":"Erro"}]}},{"type":"Invocation","value":{"target":{"type":"类","值":"GREYMatchers"},"method":"matcherForNotNil","args":[]}}]}}]}}]}},"method":"waitWithTimeout:","args" :[{"type":"CGFloat","value":0.8}]},"messageId":11}","args":[{"type":"CGFloat","value":0.8}]},"messageId":11}","args":[{"type":"CGFloat","value":0.8}]},"messageId":11}
1) Saldo conta corrente

排毒动词 ws send: {"type":"cleanup","params":{"stopRunner":false},"messageId":12}
排毒动词 ws onMessage: {"type":"cleanupDone","messageId": 12,"params":{}}
排毒动词 ws

0 通过 (4m)
1 失败

咨询 Saldo
conta corrente:错误:超过 240000 毫秒的超时。对于异步测试和钩子,确保调用了“done()”;如果返回 Promise,请确保它已解决。

4

0 回答 0