• <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"之间的确切区别是

        What is the exact difference between quot;ExpectedConditions.visibilityOfElementLocatedquot; and quot;ExpectedConditions.presenceOfElementLocatedquot;(“ExpectedConditions.visibilityOfElementLocated之间的确切区别是什么?和“ExpectedCondition

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

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

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 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>
                          <tbody id='6lL1U'></tbody>

                          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>