Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Do you get a timeout exception, you are supposed to get it after 30 seconds. You can try:</p> <pre><code>try { wait.until(elementToBeClickable(By.partialLinkText("Zum Warenkorb"))); } catch (TimeoutException e) { // Do not stop the test, continue and see what happens LOG.info("Timed out", e); } driver.findElement(By.partialLinkText("Zum Warenkorb")).click(); </code></pre> <p>it should continue after 30 seconds</p> <p>EDIT:</p> <p>Then try writing your own condition, here is what I have(you need to tweak it to suit your needs):</p> <pre><code>public class WebElementIsVisible implements ExpectedCondition&lt;Boolean&gt; { private WebElement element; private String elementId; public WebElementIsVisible(WebElement elementId) { this.element = elementId; } public WebElementIsVisible(String elementId) { this.elementId = elementId; } @Override public Boolean apply(WebDriver webDriver) { if (element != null) { return isElementVisible(element, webDriver); } else if (elementId != null) { return isElementIdVisible(elementId, webDriver); } else { throw new RuntimeException("Not supposed to reach here"); } } private Boolean isElementIdVisible(String elementId, WebDriver webDriver) { try { webDriver.findElement(By.id(elementId)); return true; } catch (NoSuchElementException e) { return false; } } private Boolean isElementVisible(WebElement element, WebDriver webDriver) { try { webDriver.findElement(By.id(element.getAttribute("id"))); return true; } catch (NoSuchElementException e) { return false; } } } </code></pre>
    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