Another Salesforce blog!!!

Salesforce, Apex

Verifying if the text exists – Selenium WebDriver


I am using C#

var webElements = (driver.FindElements(By.Id(“ctl00_ctl00_ctl00_lstPreviewCards”))).ToList();

int found = webElements.FindIndex(item => item.Text.Contains(NAME));

if (found == 0)
{
return true;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

*