Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As you say that the element is actually visible and the error's log says it is not, I think that the problem might be due to Internet Explorer's slowness. You could use this method for a quick test:</p> <pre><code>boolean isElementDisplayed(final WebDriver driver, final WebElement element, final int timeoutInSeconds) { try { ExpectedCondition condition = new ExpectedCondition&lt;Boolean&gt;() { @Override public Boolean apply(final WebDriver webDriver) { return element.isDisplayed(); } }; Wait w = new WebDriverWait(driver, timeoutInSeconds); w.until(condition); } catch (Exception ex) { //if you get here, it's because the element is not displayed after timeoutInSeconds return false; } return true; } </code></pre> <p>Use it like this:</p> <pre><code>WebElement we = driver.findElement(By.name("Complete")); if (isElementDisplayed(driver, we, 30)) { we.click(); } </code></pre> <p>This will make the driver wait (30 sec max.) till the element <strong>we</strong> becomes visible and then the driver clicks on it. If it works, then my supposition is right and you could change the method for:</p> <pre><code> void clickOn(final WebDriver driver, final WebElement element, final int timeoutInSeconds) { try { ExpectedCondition condition = new ExpectedCondition&lt;Boolean&gt;() { @Override public Boolean apply(final WebDriver webDriver) { element.click(); return true; } }; Wait w = new WebDriverWait(driver, timeoutInSeconds); w.until(condition); } catch (Exception ex) { //probably some kind of exception thrown here } return; } </code></pre> <p>and use it instead of <code>we.click()</code>, like:</p> <pre><code>WebElement we = driver.findElement(By.name("Complete")); clickOn(driver, we, 30); </code></pre> <p>The code above is an approximation to let you check your issue in a quick and clear way and, if you end up using it, you should adapt it to <em>your</em> structure of code. This kind of utility code should never appear in your tests. Your test code should be clean and the same for all the environments (browsers, version, SOs, etc.). Keep the workarounds separately, e.g. some kind of <code>util</code> package. </p> <p>Also, the method's signature is 'overweight'. Restructuring your util code, you should be able to write in your tests just this: <code>clickOn(element)</code>.</p> <p>Hope it helps ;)</p> <p><strong>UPDATE</strong> Actually, with these components I had never run into a similar problem:</p> <ol> <li><code>selenium-server-standalone</code> version 2.32.0</li> <li>IEDriverServer_x64_2.30.1.exe</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload