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

    <tfoot id='QlRlx'></tfoot>
  • <small id='QlRlx'></small><noframes id='QlRlx'>

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

      1. 如何将焦点设置在我网页的某个部分然后向下滚

        时间:2023-10-12
            <tbody id='kE2vy'></tbody>

          <legend id='kE2vy'><style id='kE2vy'><dir id='kE2vy'><q id='kE2vy'></q></dir></style></legend>
        • <i id='kE2vy'><tr id='kE2vy'><dt id='kE2vy'><q id='kE2vy'><span id='kE2vy'><b id='kE2vy'><form id='kE2vy'><ins id='kE2vy'></ins><ul id='kE2vy'></ul><sub id='kE2vy'></sub></form><legend id='kE2vy'></legend><bdo id='kE2vy'><pre id='kE2vy'><center id='kE2vy'></center></pre></bdo></b><th id='kE2vy'></th></span></q></dt></tr></i><div id='kE2vy'><tfoot id='kE2vy'></tfoot><dl id='kE2vy'><fieldset id='kE2vy'></fieldset></dl></div>
        • <small id='kE2vy'></small><noframes id='kE2vy'>

                  <bdo id='kE2vy'></bdo><ul id='kE2vy'></ul>

                  <tfoot id='kE2vy'></tfoot>
                • 本文介绍了如何将焦点设置在我网页的某个部分然后向下滚动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  使用量角器我想首先将焦点设置在网页的左侧面板上,然后向下滚动以单击过滤器.知道如何使用量角器语法来做到这一点吗?这是我的 HTML:

                  using protractor I would like to first set focus on a left pannel in my web page then scroll down in order to click on a filter. Any idea how to do this using protractor syntax? Here is my HTML :

                  <section id="filters" style="height: 266px; overflow: hidden;" tabindex=
                  "5076">
                      <div class="ng-binding" id="currentSearchTitle">
                          Current search
                      </div>
                  
                      <div id="currentSearch">
                          <div id="searchBlock">
                              <div id="jobTypeBlock">
                                  <div class="ng-binding" id="jobTypeTitle">
                                      Filter by job type
                                  </div>
                  
                                  <div class="ng-scope">
                                      <div class="ng-scope">
                                          <div class="ng-scope">
                                              <div class="ng-scope">
                                                  <div class="ng-scope">
                                                      <div class="ng-scope">
                                                          <div class="ng-scope"></div>
                  

                  推荐答案

                  要在面板上设置焦点,您可以单击它:

                  To set the focus on your panel you can maybe click on it:

                  element(by.id('filters')).click();
                  

                  然后滚动到您的过滤器,您可以执行客户端脚本:

                  Then to scroll to your filter, you can execute a client side script:

                  var filter = browser.findElement(by.id('jobTypeTitle'));
                  var scrollIntoView = function () {
                    arguments[0].scrollIntoView();
                  };
                  browser.executeScript(scrollIntoView, filter);
                  

                  您可以查看 webdriverjs 文档.

                  这篇关于如何将焦点设置在我网页的某个部分然后向下滚动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:我如何在 e2e 测试 Angular Protractor 的标签中添加文 下一篇:如何用量角器测试 html 链接?

                  相关文章

                  最新文章

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

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

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