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

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

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

      2. “ExpectedConditions.visibilityOfElementLocated"之间的确切区别是

        时间:2023-06-27

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

          <tbody id='OrjNf'></tbody>

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

            1. <legend id='OrjNf'><style id='OrjNf'><dir id='OrjNf'><q id='OrjNf'></q></dir></style></legend>
                • 本文介绍了“ExpectedConditions.visibilityOfElementLocated"之间的确切区别是什么?和“ExpectedConditions.presenceOfElementLocated"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如果我的问题听起来很重要,我提前道歉,我是 QA 和 Selenium 的新手.

                  My apologies in advance if my question sounds primary, I am very new at QA and Selenium.

                  两者之间的确切区别是什么:

                  What is the exact difference between:

                   wait.until(ExpectedConditions.visibilityOfElementLocated
                                      (By.xpath("//a[text()='Show advanced settings...']"))).click();
                  

                   wait.until(ExpectedConditions.presenceOfElementLocated
                                      (By.xpath("//a[text()='Show advanced settings...']"))).click();
                  

                  我查看了 这里但没弄明白.

                  I had a look at here but did not figure it out.

                  推荐答案

                  visibilityOfElmementLocated 检查元素是否存在并且是否可见.为了检查可见性,它确保元素的高度和宽度大于 0.

                  The visibilityOfElmementLocated checks to see if the element is present and also visible. To check visibility it makes sure the element has a height and width greater than 0.

                  presenceOfElementLocated 只是检查 dom 以查看它是否可以定位元素,无论其可见性如何.

                  The presenceOfElementLocated just checks the dom to see if it can locate an element no matter its visibility.

                  来源:https://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html#visibilityOf-org.openqa.selenium.WebElement-

                  可见性公共静态 ExpectedCondition visibilityOf(WebElement 元素)期望检查已知存在于页面 DOM 上的元素是否可见.可见性是指元素不仅显示出来,而且高度和宽度都大于0.参数:

                  visibilityOf public static ExpectedCondition visibilityOf(WebElement element) An expectation for checking that an element, known to be present on the DOM of a page, is visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0. Parameters:

                  这篇关于“ExpectedConditions.visibilityOfElementLocated"之间的确切区别是什么?和“ExpectedConditions.presenceOfElementLocated"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在 Selenium 中获取 WebElement 的 HTML 代码 下一篇:Selenium chromedriver 禁用日志记录或将其重定向 java

                  相关文章

                  <legend id='6lL1U'><style id='6lL1U'><dir id='6lL1U'><q id='6lL1U'></q></dir></style></legend>

                  <small id='6lL1U'></small><noframes id='6lL1U'>

                    <tfoot id='6lL1U'></tfoot>
                      <bdo id='6lL1U'></bdo><ul id='6lL1U'></ul>

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