如何使用量角器选择动态表中的特定数据? [英] How to select specific data in dynamic table using protractor?

查看:41
本文介绍了如何使用量角器选择动态表中的特定数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用量角器自动化一些场景,我们需要验证动态表中的数据是否正在更新.

I am trying to automate some scenarios using protractor where we need to verify whether the data is updating in dynamic table.

请在下面找到

HTML 代码:在此处输入图片描述

页面中的表格:在此处输入图片描述

推荐答案

可以通过使用添加的组 ID 或组名称验证元素是否存在于 DOM 中来完成.

It can be done by verifying that element is present in the DOM with the added Group ID or Group Name.

对于组 ID:

element(by.xpath("*//table//tbody//tr//td[1]//p[text()='Amanda Test组']")).isDisplayed()

element(by.xpath("*//table//tbody//tr//td[1]//p[text()='Amanda Test Group']")).isDisplayed()

对于组名:

element(by.xpath("*//table//tbody//tr//td[2]//p[text()='Amanda组']")).isDisplayed()

element(by.xpath("*//table//tbody//tr//td[2]//p[text()='Amanda Group']")).isDisplayed()

这篇关于如何使用量角器选择动态表中的特定数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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