如何获得使用表格而不是使用量角器的转发器的网格上的寄存器数?

保洛塔西奥

我有一个网格,上面有5个元素。而且我有旅行的时间。我需要在网格中获取项目的总数,但它使用的是对象。我该怎么做?

我不理解HTML,它使用对象吗?我不知道该怎么做。

**部分HTML:**

<div class="ui-datatable-tablewrapper">
                <table>
                    <thead>
                        <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><tr class="ui-state-default">
                            <!--template bindings={
  "ng-reflect-ng-for-of": "[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]"
}--><th ng-reflect-raw-class="[object Object]" class="ui-state-default ui-unselectable-text" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title">Tipo de Norma</span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th><th ng-reflect-raw-class="[object Object]" class="ui-state-default ui-unselectable-text" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title">Número</span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th><th ng-reflect-raw-class="[object Object]" class="ui-state-default ui-unselectable-text" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title">Ano</span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th><th ng-reflect-raw-class="[object Object]" class="ui-state-default ui-unselectable-text" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title">Descrição</span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th><th ng-reflect-raw-class="[object Object]" class="ui-state-default ui-unselectable-text" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title">Status</span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th><th ng-reflect-raw-class="[object Object]" class="ui-state-default ui-unselectable-text" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title">Data de Publicação</span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th><th ng-reflect-raw-class="[object Object]" class="ui-state-default ui-unselectable-text" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title">Ativo</span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th><th ng-reflect-raw-class="[object Object]" class="kebab-column ui-state-default ui-unselectable-text" ng-reflect-initial-classes="kebab-column" draggable="false" style="display: table-cell;">
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-column-title"></span>
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                            </th>
                        </tr>
                        <!--template bindings={
  "ng-reflect-ng-for-of": null
}-->
                    </thead>
                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                    <tbody class="ui-datatable-data ui-widget-content">
                        <!--template bindings={
  "ng-reflect-ng-for-of": "[object Object],[object Object],[object Object],[object Object],[object Object]"
}-->
                            <tr class="ui-widget-content ui-datatable-even" ng-reflect-raw-class="[object Object]" ng-reflect-initial-classes="ui-widget-content">
                                <!--template bindings={
  "ng-reflect-ng-for-of": "[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]"
}--><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">Lei</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">1800</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">1800</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">Teste para ver se norma esta desativada</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">Revogado</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">01/08/2016</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">Inativo</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" class="kebab-column" ng-reflect-initial-classes="kebab-column" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "[object Object]"
}--><span class="ui-cell-data">
                                        <p-columntemplateloader ng-reflect-column="[object Object]" ng-reflect-row-data="[object Object]" ng-reflect-row-index="0"></p-columntemplateloader>

        <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><button class="btn btn-flat btn-no-text btn-kebab-view">
          <i class="zmdi zmdi-more-vert"></i>
        </button>

        <!--template bindings={
  "ng-reflect-ng-if": null
}-->


                                    </span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td>
                            </tr>
                            <!--template bindings={
  "ng-reflect-ng-if": null
}-->

                            <tr class="ui-widget-content ui-datatable-odd" ng-reflect-raw-class="[object Object]" ng-reflect-initial-classes="ui-widget-content">
                                <!--template bindings={
  "ng-reflect-ng-for-of": "[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]"
}--><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">Resolução</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">333</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">2011</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">teste</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                </td><td ng-reflect-raw-class="[object Object]" style="display: table-cell;">
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "true"
}--><span class="ui-cell-data">Revogado</span>
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": null
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->
                                    <!--template bindings={
  "ng-reflect-ng-if": "false"
}-->

            </div>
塞巴斯蒂安·塞巴尔德(Sebastian Sebald)

量角器只是Selenium的有用包装,您不应访问任何JavaScriptObject来计数。为了计算表中的行,请使用element.all(by.css('table td'))

如果您有分页,这将使计数变得更加棘手。您可以将上述调用包装在一个.each循环中在循环中,您转到下一页,等待其加载,然后计数。

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

如何使用量角器处理微调器

来自分类Dev

使用量角器“期望”

来自分类Dev

替代在Angular站点上使用量角器

来自分类Dev

如何使用量角器API而不是配置文件设置量角器(v1.4.0)baseUrl?

来自分类Dev

如何使用量角器获取当前网址?

来自分类Dev

如何使用量角器测试班级的存在

来自分类Dev

如何使用量角器发送POST

来自分类Dev

如何使用量角器上传文件

来自分类Dev

如何使用量角器测试angularjs应用

来自分类Dev

如何使用量角器访问SVG元素

来自分类Dev

如何使用量角器模拟Angular服务?

来自分类Dev

如何使用量角器选择组件元素?

来自分类Dev

如何使用量角器按文本查找和单击表格元素?

来自分类Dev

如何使用量角器按文本查找和单击表格元素?

来自分类Dev

如何使用Chrome在MAC上使用量角器复制和粘贴?

来自分类Dev

如何使用量角器将鼠标悬停在画布元素的区域上

来自分类Dev

量角器:无法获得转发器元素

来自分类Dev

在使用量角器元素函数选择的元素上使用 then() 后,黄瓜量角器超时

来自分类Dev

无法使用量角器webdriver-manager

来自分类Dev

mouseover元素无法使用量角器工作

来自分类Dev

使用量角器按className定位按钮

来自分类Dev

使用量角器设置IEDriverServer位置

来自分类Dev

使用量角器测试无限滚动

来自分类Dev

使用量角器测试链接颜色

来自分类Dev

在循环中使用量角器

来自分类Dev

使用量角器进行滑块测试

来自分类Dev

通过变量使用量角器链接元素?

来自分类Dev

在电子中使用量角器

来自分类Dev

使用量角器获取背景颜色