具有相同formControlname的多个元素的量角定位器
我正在尝试找到一个文本字段的元素,并提供formControlname。但是,对于单击“添加”按钮后的所有输入字段,formControlname都是相同的。那么,如何使用相同的FormControlname插入到第n个文本字段中?如何使用相同的FormControlname获取元素的总数?
我是使用量角器的自动化的新手,请提供帮助。
我们目前正在使用量角javaScript的黄瓜框架。
I am trying to locate an element which is text field, and provided with formControlName. But the formControlName is same for all the input fields that comes after clicking on the add button. So how can i insert into the nth text field with same formControlName? how to fetch the total count of elements with same formControlName?
I am new to this automation using protractor, please do help.
We are currently using cucumber framework with protractor javascript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了获取具有相同formControlname元素的总计数,可以通过使用
输入到nth元素来实现,可以通过与定位器一起提供数字来完成,例如,
它将在此处选择带有名称主题的第3个输入到底订单
To fetch the total count of elements with same formcontrolname can be achieved by using
If you want to input to nth element it can be done by providing the number with the locator for example,
here,it will select the 3rd input with name subject from top to bottom order