由于某种原因,我的“ it”仅在事先有另一个“ it”时才会出现此错误。如果单独使用它,则效果很好。这是我得到的错误:
失败:元素在点(1225,30)不可点击,因为另一个元素将其遮盖 构建信息:版本:'3.141.59',修订版本:'e82be7d358',时间:'2018-11-14T08:25:53' 系统信息:主机:'Elirans-MacBook-Pro.local',ip:'fe80:0:0:0:18e9:8427:c9dd:6767%en0',操作系统名称:'Mac OS X',os.arch :'x86_64',os.version:'10 .13.6',java.version:'1.8.0_131' 驱动程序信息:driver.version:未知
it('should restore deleted device', function () {
var length_before, length_after;
element.all(by.repeater('device in displaysList.available')).count().then(function (len) {
length_before = len;
});
DevicesPage.restoreDevice();
element.all(by.repeater('device in displaysList.available')).count().then(function (len) {
length_after = len;
expect((length_after > length_before)).toBe(true);
});
});
this.restoreDevice = function () {
let menu = element(by.css('div span button[ng-click="sortPopover.show($event);"]'));
let showDeleted = element(by.css('div label[ng-click="sortPopover.hide()"]'));
let moreOptions = this.getMoreOptionsBtn();
let restore = element(by.css('div a[ng-click="undeleteDevice(currentPopoverDevice)"]'));
menu.click();
showDeleted.click();
moreOptions.click();
restore.click();
};