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

  • <legend id='Y5DCz'><style id='Y5DCz'><dir id='Y5DCz'><q id='Y5DCz'></q></dir></style></legend>

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

    • <bdo id='Y5DCz'></bdo><ul id='Y5DCz'></ul>

      1. 元素 MyElement 在点 (x, y) 处不可点击...其他元素将收到点击

        时间:2023-07-13

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

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

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

              <tfoot id='tTAuH'></tfoot>

                <legend id='tTAuH'><style id='tTAuH'><dir id='tTAuH'><q id='tTAuH'></q></dir></style></legend>
                  本文介绍了元素 MyElement 在点 (x, y) 处不可点击...其他元素将收到点击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用基于硒的 Katalon Studio 进行一些测试.在我的一项测试中,我必须在文本区域内编写.问题是我收到以下错误:

                  I am trying to make some tests using selenium based Katalon Studio. In one of my tests I have to write inside a textarea. The problem is that I get the following error:

                  ...Element MyElement is not clickable at point (x, y)... Other element would receive the click...
                  

                  事实上,我的元素被放置在其他一些可能隐藏它的 diva 中,但我怎样才能让点击事件命中我的文本区域?

                  In fact my element is place inside some other diva that might hide it but how can I make the click event hit my textarea?

                  推荐答案

                  元素 ... 在点 (x, y) 处不可点击.其他元素会收到点击可能是由不同的因素引起的.您可以通过以下任一过程来解决它们:

                  Element ... is not clickable at point (x, y). Other element would receive the click" can be caused for different factors. You can address them by either of the following procedures:

                  1. 由于存在 JavaScript 或 AJAX 调用,元素没有被点击

                  尝试使用 Actions 类:

                  WebElement element = driver.findElement(By.id("id1"));
                  Actions actions = new Actions(driver);
                  actions.moveToElement(element).click().build().perform();
                  

                  1. 元素没有被点击,因为它不在 视口

                  尝试使用 JavascriptExecutor 将元素带入 Viewport:

                  Try to use JavascriptExecutor to bring the element within Viewport:

                  JavascriptExecutor jse1 = (JavascriptExecutor)driver;
                  jse1.executeScript("scroll(250, 0)"); // if the element is on top.
                  jse1.executeScript("scroll(0, 250)"); // if the element is at bottom.
                  

                  或者

                  WebElement myelement = driver.findElement(By.id("id1"));
                  JavascriptExecutor jse2 = (JavascriptExecutor)driver;
                  jse2.executeScript("arguments[0].scrollIntoView()", myelement); 
                  

                  1. 在元素可点击之前页面正在刷新.

                  在这种情况下诱导一些wait.

                  In this case induce some wait.

                  1. 元素存在于 DOM 中,但不可点击.

                  在这种情况下,添加一些 ExplicitWait 以使元素可点击.

                  In this case add some ExplicitWait for the element to be clickable.

                  WebDriverWait wait2 = new WebDriverWait(driver, 10);
                  wait2.until(ExpectedConditions.elementToBeClickable(By.id("id1")));
                  

                  1. 元素存在,但具有临时叠加层.

                  在这种情况下,诱导 ExplicitWait 并将 ExpectedConditions 设置为 invisibilityOfElementLocated 使叠加层不可见.

                  In this case induce ExplicitWait with ExpectedConditions set to invisibilityOfElementLocated for the Overlay to be invisible.

                  WebDriverWait wait3 = new WebDriverWait(driver, 10);
                  wait3.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath("ele_to_inv")));
                  

                  1. 元素存在,但具有永久叠加层.

                  使用 JavascriptExecutor 直接在元素上发送点击.

                  Use JavascriptExecutor to send the click directly on the element.

                  WebElement ele = driver.findElement(By.xpath("element_xpath"));
                  JavascriptExecutor executor = (JavascriptExecutor)driver;
                  executor.executeScript("arguments[0].click();", ele);
                  

                  这篇关于元素 MyElement 在点 (x, y) 处不可点击...其他元素将收到点击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Selenium Web 驱动程序爪哇.元素在点 (x, y) 处不可点击.其他元素会收到点击 下一篇:如何解决 ElementNotInteractableException:元素在 Selenium webdriver

                  相关文章

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

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

                      <tfoot id='Tsxtw'></tfoot>

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