Automation 如何计算量角器Jasmine中不';你没有身份证吗?

Automation 如何计算量角器Jasmine中不';你没有身份证吗?,automation,protractor,automated-tests,jasmine-node,Automation,Protractor,Automated Tests,Jasmine Node,由于我刚刚开始探索量角器,我对如何计算量角器中的行数一无所知。谁能帮我找到它吗 登录到某个页面后,我应该匹配行数。我尝试的每件事都会出现超时错误 Failed: Timed out waiting for Protractor to synchronize with the page after 11 seconds. Please see https://github.com/angular/protractor/blob/master/docs/fa q.md Stack: ScriptTi

由于我刚刚开始探索量角器,我对如何计算量角器中的行数一无所知。谁能帮我找到它吗

登录到某个页面后,我应该匹配行数。我尝试的每件事都会出现超时错误

Failed: Timed out waiting for Protractor to synchronize with the page after
11 seconds. Please see https://github.com/angular/protractor/blob/master/docs/fa
q.md
Stack:
ScriptTimeoutError: asynchronous script timeout: result was not received in
11 seconds
以上是我收到的错误消息

  <table class="table table-bordered">
                      <thead>
                          <tr>

                              <th>Data Source</th><th>Server Name</th>
                              <th>Latest Source Refresh Date</th>
                              <th>QA Last Completed</th>
                              <th>Ran By</th>
                              <th><label><input type="checkbox">&nbsp;Include in QA</label></th>
                          </tr>
                      </thead>
                      <tbody>
                          <!--template bindings={}--><tr class="success">

                              <td>Austria</td><td>CDTSSQL580P.WHSVC_AT_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Mar 08, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Mar 02, 17, 11:28 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>Bulgaria</td><td>CDTSSQL807P.WHSVC_BG_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Feb 22, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 12:15 PM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>Czech</td><td>CDTSSQL484P.WHSVC_CZ_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Mar 12, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 4:44 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>Germany</td><td>CDTSSQL826P.WHSVC_DE_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Mar 11, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 4:40 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>Italy</td><td>CDTSSQL350P.WHSVC_IT_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Mar 05, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 4:45 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>Serbia</td><td>CDTSSQL826P.WHSVC_SR_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Feb 20, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 4:46 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>Slovakia</td><td>CDTSSQL807P.WHSVC_SK_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Mar 11, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 4:46 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>Turkey</td><td>CDTSSQL484P.WHSVC_TR_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Mar 06, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 4:46 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                                  <!--template bindings={}-->
                              </td>
                          </tr><tr class="success">

                              <td>UK</td><td>CDTSSQL807P.WHSVC_UK_M_IMS_1</td>
                              <td>
                                 <!--template bindings={}--><span> Mar 08, 17</span>
                                 <!--template bindings={}--> 

                              </td>
                              <td>Feb 15, 17, 4:46 AM</td>
                              <td>ims</td>
                              <td>
                                  <!--template bindings={}--><input type="checkbox">
                              <!--template bindings={}-->
                          </td>
                      </tr>
                  </tbody>
              </table>

数据源服务器名称
最新源刷新日期
上次完成的质量保证
路过
包括在QA中
澳大利亚DTSSQL580P.WHSVC_在_M_IMS_1
2017年3月8日
三月二、十七、十一时二十八分
智能弹药系统
保加利亚CDTSSQL807P.WHSVC_BG_M_IMS_1
2017年2月22日
二月十五、十七、十二点十五分
智能弹药系统
CzechdTSSQL484P.WHSVC_CZ_M_IMS_1
2017年3月12日
二月十五、十七、四点四十四分
智能弹药系统
德国CDTSSQL826P.WHSVC_DE_M_IMS_1
2017年3月11日
二月十五、十七、四点四十分
智能弹药系统
ITALYDTSSQL350P.WHSVC_IT_M_IMS_1
2017年3月5日
二月十五、十七、四点四十五分
智能弹药系统
塞尔维亚DTSSQL826P.WHSVC_SR_M_IMS_1
2017年2月20日
二月十五、十七、四点四十六分
智能弹药系统
斯洛伐克ACDTSSQL807P.WHSVC_SK_M_IMS_1
2017年3月11日
二月十五、十七、四点四十六分
智能弹药系统
土耳其CDTSSQL484P.WHSVC_TR_M_IMS_1
2017年3月6日
二月十五、十七、四点四十六分
智能弹药系统
UKCDTSSSQL807P.WHSVC_UK_M_IMS_1
2017年3月8日
二月十五、十七、四点四十六分
智能弹药系统
您可以使用
ElementArrayFinder
中的
count()
方法获取给定定位器的元素数

expect(element.all(by.css("table tbody tr")).count()).toBeGreaterThan(0);

要避免ScriptTimeOutError,请在conf.js中增加脚本超时值。将以下值添加到配置文件中
allScriptsTimeout:60000

我可以使用量角器成功登录到该页面,但无法匹配行数。您是否可以使用收到的错误消息更新问题?更新了我的答案。
 element.all(by.css('tbody tr')).then(function(totalRows) {
    console.log(totalRows.length);  
    //OR Any expect(...)
 });