[英]While using Protractor, when clicking a button which causes an http request to be made, I receive this: error while waiting for protractor to sync
describe("I should see a a list of cars to add ", function() {
var add_car_button = element(by.id('add_car'));
add_car_btn.click() // Failure, can't continue on from here
// assertions to follow...
});
The error received from Protractor when running the test: 运行测试时从量角器收到的错误:
error while waiting for protractor to sync
等待量角器同步时出错
The add_car_btn
will send the user to a new page where a list of cars (gathered via an http get request) will be displayed to the user. add_car_btn
会将用户发送到新页面,在该页add_car_btn
将向用户显示汽车列表(通过http get请求收集)。 How can I successfully instruct the webdriver to click the button without failing to continue onward? 如何成功指示网络驱动程序单击按钮而又不继续前进?
将失败的代码放在beforeEach块中是一种成功的解决方法,请参见https://github.com/angular/protractor/issues/376
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.