当元素不存在时,期望元素不存在超时

时间:2017-12-21 09:57:44

标签: react-native detox

我试图验证元素是否存在。但是当我这样做时:

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

我得到"错误:超出240000ms超时。对于异步测试和挂钩,请确保" done()"叫做;如果返回Promise,请确保它已解决。"

  

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

设备和详细的排毒日志

  

detox动词ws send:{" type":" invoke"," params":{" target":{&#34 ;类型":"调用""值" {"目标" {"类型":"调用&# 34;,"值" {"目标" {"类型":" EarlGrey""值&#34 ;: "实例"}"方法":" detox_selectElementWithMatcher:"" ARGS":[{"类型&#34 ;: "调用""值" {"目标" {"类型":"级"&#34 ;值":" GREYMatchers"}"方法":" detox_matcherForAccessibilityLabel:"" ARGS":[{&#34 ;输入":" NSString","值":" Saldo de conta-corrente"}]}}]}},"方法&# 34;:" atIndex:"" ARGS":[{"类型":" NSInteger的""值&#34 ;:0}]}}"方法":"的performAction:"" ARGS":[{"类型":&# 34;调用""值" {"目标" {"类型":"级""值& #34;:" GREYActions&#34 ;}"方法":" actionForTap"" ARGS":[]}}]}," MESSAGEID" 10}
  排毒动词ws onMessage:{" type":" invokeResult"," messageId":10," params":{"结果& #34;:"(GREYElementInteraction)"}}
  排毒动词ws
  排毒动词ws send:{" type":" invoke"," params":{" target":{" type&# 34;:"调用""值" {"目标" {"类型":"级&#34 ;, "值":" GREYCondition"}"方法":" detoxConditionForNotElementMatched:"" ARGS":[{ "类型":"调用""值" {"目标" {"类型":&#34 ; EarlGrey""值":"实例"}"方法":" detox_selectElementWithMatcher:"" ARGS& #34;:[{"类型":"调用""值" {"目标" {"类型&# 34;:"级""值":" GREYMatchers"}"方法":" detoxMatcherForBoth:和:&# 34;," ARGS":[{"类型":"调用""值" {"目标" :{"类型":"级""值":" GREYMatchers"}"方法":&# 34; detox_matcherForAccessibilityLabel:"" ARGS":[{"类型":" NSString的"&#34 ;值":" ERRO"}]}},{"类型":"调用""值" {&# 34;目标" {"类型":"级""值":" GREYMatchers"}"方法& #34;:" matcherForNotNil"" ARGS":[]}}]}}]}}]}}"方法":" waitWithTimeout :"" ARGS":[{"类型":" CGFloat的""值":0.8}]},& #34; MESSAGEID":11}
  1)Saldo conta corrente

     

detox动词ws send:{" type":" cleanup"," params":{" stopRunner":false},& #34; MESSAGEID":12}
  排毒动词ws onMessage:{" type":" cleanupDone"," messageId":12," params":{}}   排毒动词ws

     

0传球(4m)
  1失败

     

咨询Saldo conta corrente:
  错误:超出240000ms超时。对于异步测试和挂钩,请确保" done()"叫做;如果返回Promise,请确保它已解决。

0 个答案:

没有答案