在量角器测试中,有没有办法在测试运行之间等待 [英] In protractor test is there a way to wait between test run

查看:18
本文介绍了在量角器测试中,有没有办法在测试运行之间等待的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在量角器中,有没有办法在每次测试运行之间添加显式等待,效果和Java中的Thread.sleep一样?

In protractor, is there a way to add explicit wait between each test run, which has the same effect as Thread.sleep in Java?

推荐答案

你可以在调试模式下启动量角器

you could either start protractor in debug mode

运行protractor debug debugging/yourConfigFile.js

并在您希望它停止的测试规范中添加 browser.debugger();

and add browser.debugger(); in your test spec where you want it to stop

这里是调试文档的链接

或者只使用 browser.sleep(valueInMilliSeconds);

这篇关于在量角器测试中,有没有办法在测试运行之间等待的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆