GetTextFromElementAsync
Description: the method returns the text from the specified element
Syntax:
GetTextFromElementAsync(string by, string locator)
GetTextFromElementAsync(Locator locator)
Return value: string
Example:
string text = await tester.GetTextFromElementAsync(Tester.BY_CSS, "#auth > h2");
string text = await tester.GetTextFromElementAsync(Tester.BY_XPATH, "//div[@id='auth']//h2");
string text = await tester.GetTextFromElementAsync(tester.GetLocator("locatorName"));
Created with the Personal Edition of HelpNDoc: Easily create Help documents