<legend id='8KyDU'><style id='8KyDU'><dir id='8KyDU'><q id='8KyDU'></q></dir></style></legend>

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

          <bdo id='8KyDU'></bdo><ul id='8KyDU'></ul>
      1. <small id='8KyDU'></small><noframes id='8KyDU'>

      2. “ExpectedConditions.visibilityOfElementLocated"之间的

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

          <small id='8UWAf'></small><noframes id='8UWAf'>

                  本文介绍了“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"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

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

                  相关文章

                  最新文章

                  1. <tfoot id='R8rC7'></tfoot>
                  2. <small id='R8rC7'></small><noframes id='R8rC7'>

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

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

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