• <bdo id='d7x9L'></bdo><ul id='d7x9L'></ul>

        <small id='d7x9L'></small><noframes id='d7x9L'>

        <tfoot id='d7x9L'></tfoot>
      1. <legend id='d7x9L'><style id='d7x9L'><dir id='d7x9L'><q id='d7x9L'></q></dir></style></legend>

        <i id='d7x9L'><tr id='d7x9L'><dt id='d7x9L'><q id='d7x9L'><span id='d7x9L'><b id='d7x9L'><form id='d7x9L'><ins id='d7x9L'></ins><ul id='d7x9L'></ul><sub id='d7x9L'></sub></form><legend id='d7x9L'></legend><bdo id='d7x9L'><pre id='d7x9L'><center id='d7x9L'></center></pre></bdo></b><th id='d7x9L'></th></span></q></dt></tr></i><div id='d7x9L'><tfoot id='d7x9L'></tfoot><dl id='d7x9L'><fieldset id='d7x9L'></fieldset></dl></div>

        如何单击量角器中的隐藏元素?

        时间:2023-10-12
      2. <small id='Abj93'></small><noframes id='Abj93'>

        1. <tfoot id='Abj93'></tfoot>
        2. <i id='Abj93'><tr id='Abj93'><dt id='Abj93'><q id='Abj93'><span id='Abj93'><b id='Abj93'><form id='Abj93'><ins id='Abj93'></ins><ul id='Abj93'></ul><sub id='Abj93'></sub></form><legend id='Abj93'></legend><bdo id='Abj93'><pre id='Abj93'><center id='Abj93'></center></pre></bdo></b><th id='Abj93'></th></span></q></dt></tr></i><div id='Abj93'><tfoot id='Abj93'></tfoot><dl id='Abj93'><fieldset id='Abj93'></fieldset></dl></div>
          <legend id='Abj93'><style id='Abj93'><dir id='Abj93'><q id='Abj93'></q></dir></style></legend>

                <tbody id='Abj93'></tbody>
                  <bdo id='Abj93'></bdo><ul id='Abj93'></ul>
                • 本文介绍了如何单击量角器中的隐藏元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我有一个元素,只有当我将鼠标悬停在它上面时才可见.

                  I have an element which is visible only when I hover over it.

                  我编写了以下代码来悬停在面板上,以便元素可见.

                  I've written following code to hove over the panel so that the element is visible.

                  ptor.actions().
                              mouseMove(ptor.findElement(protractor.By.xpath('//*[@id="productapp"]/div/div/div[2]/div/div/div/div[2]/div/div/div/div[4]/table/thead/tr/th[2]'))).
                              perform();
                          ptor.element.all(by.tagName('i')).then(function(elm){
                              elm[0].click();
                          });
                  

                  现在我试图点击它,但它显示 -ElementNotVisibleError:元素不可见量角器错误.

                  Now I tried to click on it, but it says - ElementNotVisibleError: element not visible error in protractor.

                  基本情况是,我想将鼠标悬停在面板上,然后单击隐藏的元素,因为该元素在悬停之前是不可见的.

                  Basic scenario is, I want to hover over a panel and then click on the hidden element, because the element is not visible until it is hovered over.

                  推荐答案

                  以下代码对我有用.

                    ptor.actions().
                      mouseMove(ptor.findElement(protractor.By.xpath('//*@id="productapp"]/div/div/di‌​v[2]/div/div/div/div[2]/div/div/div/div[4]/table/thead/tr/th[2]'))).perform();
                  
                     ptor.element.all(by.css('i.ng-scope.tea-ic-sorting')).then(function(elm){
                         elm[0].click();
                      });
                  

                  这篇关于如何单击量角器中的隐藏元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:获取当前选中的文本 下一篇:如何测试阻力&amp;AngularJS e2e 测试中的删除功能

                  相关文章

                  最新文章

                  1. <i id='3whp3'><tr id='3whp3'><dt id='3whp3'><q id='3whp3'><span id='3whp3'><b id='3whp3'><form id='3whp3'><ins id='3whp3'></ins><ul id='3whp3'></ul><sub id='3whp3'></sub></form><legend id='3whp3'></legend><bdo id='3whp3'><pre id='3whp3'><center id='3whp3'></center></pre></bdo></b><th id='3whp3'></th></span></q></dt></tr></i><div id='3whp3'><tfoot id='3whp3'></tfoot><dl id='3whp3'><fieldset id='3whp3'></fieldset></dl></div>

                    <legend id='3whp3'><style id='3whp3'><dir id='3whp3'><q id='3whp3'></q></dir></style></legend>
                      <bdo id='3whp3'></bdo><ul id='3whp3'></ul>

                    <small id='3whp3'></small><noframes id='3whp3'>

                      <tfoot id='3whp3'></tfoot>