<legend id='SwKkR'><style id='SwKkR'><dir id='SwKkR'><q id='SwKkR'></q></dir></style></legend>

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

<tfoot id='SwKkR'></tfoot>
      <i id='SwKkR'><tr id='SwKkR'><dt id='SwKkR'><q id='SwKkR'><span id='SwKkR'><b id='SwKkR'><form id='SwKkR'><ins id='SwKkR'></ins><ul id='SwKkR'></ul><sub id='SwKkR'></sub></form><legend id='SwKkR'></legend><bdo id='SwKkR'><pre id='SwKkR'><center id='SwKkR'></center></pre></bdo></b><th id='SwKkR'></th></span></q></dt></tr></i><div id='SwKkR'><tfoot id='SwKkR'></tfoot><dl id='SwKkR'><fieldset id='SwKkR'></fieldset></dl></div>
        • <bdo id='SwKkR'></bdo><ul id='SwKkR'></ul>
      1. C# Selenium - 在不断增长的页面上查找元素

        时间:2023-09-13
        <i id='Vop5C'><tr id='Vop5C'><dt id='Vop5C'><q id='Vop5C'><span id='Vop5C'><b id='Vop5C'><form id='Vop5C'><ins id='Vop5C'></ins><ul id='Vop5C'></ul><sub id='Vop5C'></sub></form><legend id='Vop5C'></legend><bdo id='Vop5C'><pre id='Vop5C'><center id='Vop5C'></center></pre></bdo></b><th id='Vop5C'></th></span></q></dt></tr></i><div id='Vop5C'><tfoot id='Vop5C'></tfoot><dl id='Vop5C'><fieldset id='Vop5C'></fieldset></dl></div>
        • <bdo id='Vop5C'></bdo><ul id='Vop5C'></ul>
              <tbody id='Vop5C'></tbody>

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

              <legend id='Vop5C'><style id='Vop5C'><dir id='Vop5C'><q id='Vop5C'></q></dir></style></legend>

                  <tfoot id='Vop5C'></tfoot>

                • 本文介绍了C# Selenium - 在不断增长的页面上查找元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试找到比使用更好的方法:

                  I am trying to find a better way to do this than using:

                  js.ExecuteScript("scroll(0, 1300)");
                  

                  我有一个页面,其中的数据可以更改,从而使页面高度的大小向上或向下变化.所以当我今天去点击一个位于 1500px 的元素时,明天它可能是 800px 并且找不到该元素并且测试用例失败.

                  I have a page where the data can change making the page height change up or down in size. So when I go to click on an element today that is located at 1500px, tomorrow it may be 800px and the element will not be found and the test case fails.

                  那么你们用什么来定位页面上大小发生变化的元素?

                  So what have you guys used to locate elements on a page where the size changes?

                  推荐答案

                  我开始使用下面的,似乎运行良好.感谢大家的帮助.

                  I started using the below which seems to be working nicely. Thanks for the help all.

                             IWebElement bio = SeleniumDriver.FindElement(By.XPath("path"));
                                  Actions actions = new Actions(SeleniumDriver);
                                  actions.MoveToElement(bio);
                                  actions.Perform();
                  

                  这篇关于C# Selenium - 在不断增长的页面上查找元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:为 Selenium PhantomJSDriver 指定 PhantomJS 命令行选项 下一篇:如何在 C# 中使用 Firefox 启动特定 URL

                  相关文章

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

                  <small id='7hb8m'></small><noframes id='7hb8m'>

                    <tfoot id='7hb8m'></tfoot>