From the source code you will be able to view that, ExpectedConditions.elementToBeClickable()
, it will judge the element visible and enabled, so you can use isEnabled()
together with isDisplayed()
. Following is the source code.
public static ExpectedCondition<WebElement> elementToBeClickable(final WebElement element) {_x000D_
return new ExpectedCondition() {_x000D_
public WebElement apply(WebDriver driver) {_x000D_
WebElement visibleElement = (WebElement) ExpectedConditions.visibilityOf(element).apply(driver);_x000D_
_x000D_
try {_x000D_
return visibleElement != null && visibleElement.isEnabled() ? visibleElement : null;_x000D_
} catch (StaleElementReferenceException arg3) {_x000D_
return null;_x000D_
}_x000D_
}_x000D_
_x000D_
public String toString() {_x000D_
return "element to be clickable: " + element;_x000D_
}_x000D_
};_x000D_
}
_x000D_