无法使用量角器虚拟重复选择元素

编程入门 行业动态 更新时间:2024-10-27 06:25:20
本文介绍了无法使用量角器虚拟重复选择元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我能够使用 ng-repeat 选择一个元素,但开发人员使用了虚拟重复,因此以下代码现在不起作用

I was able to select an element using ng-repeat but the developers have used virtual repeat as such the following code does not work now

expect(stores.listStores(0).getText()).toContain('Prahran'); expect(element.all(by.repeater('store in ui.stores')).count()).toEqual(1);

失败:索引越界.尝试访问 index: 0 处的元素,但只有 0 个元素匹配定位器 by.repeater("store in ui.stores")

Failed: Index out of bound. Trying to access element at index: 0, but there are only 0 elements that match locator by.repeater("store in ui.stores")

推荐答案

你可以制作一个CSS选择器来匹配material design的repeater元素:

You can make a CSS selector to match the material design repeater elements:

element.all(by.css('[md-virtual-repeat="store in ui.stores"]'));

更多推荐

无法使用量角器虚拟重复选择元素

本文发布于:2023-11-23 03:37:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619942.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:量角器   元素

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!