ExpectedConditionsTextToBePresentInElement Method WebDriver
An expectation for checking if the given text is present in the specified element.

Namespace: OpenQA.Selenium.Support.UI
Assembly: WebDriver.Support (in WebDriver.Support.dll) Version: 3.1.0
Syntax

public static Func<IWebDriver, bool> TextToBePresentInElement(
	IWebElement element,
	string text
)

Parameters

element
Type: OpenQA.SeleniumIWebElement
The WebElement
text
Type: SystemString
Text to be present in the element

Return Value

Type: FuncIWebDriver, Boolean
once the element contains the given text; otherwise, .
See Also

Reference