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

      <bdo id='noIUX'></bdo><ul id='noIUX'></ul>
  • <legend id='noIUX'><style id='noIUX'><dir id='noIUX'><q id='noIUX'></q></dir></style></legend><tfoot id='noIUX'></tfoot>

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

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

        How to set focus on a section of my web page then scroll down(如何将焦点设置在我网页的某个部分然后向下滚动)

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

                <tfoot id='gYFYJ'></tfoot>

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

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

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

                  问题描述

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

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

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What are valid deviceNames for Chrome emulation testing with Protractor?(使用 Protractor 进行 Chrome 模拟测试的有效设备名称是什么?)
                  Protractor Check if Element Does Not Exist(量角器检查元素是否不存在)
                  Protractor e2e Tests Login Redirection(Protractor e2e 测试登录重定向)
                  Explain about async/ await in Protractor(解释 Protractor 中的 async/await)
                  Protractor browser.wait doesn#39;t wait(量角器 browser.wait 不等待)
                  How to use Protractor with Angular 2?(如何在 Angular 2 中使用量角器?)
                  <legend id='BddlP'><style id='BddlP'><dir id='BddlP'><q id='BddlP'></q></dir></style></legend><tfoot id='BddlP'></tfoot>

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

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

                          <tbody id='BddlP'></tbody>
                            <bdo id='BddlP'></bdo><ul id='BddlP'></ul>