There is a code with the following script:
- Search links on the page
- If the text contains a "C # program" , then the code clicks on the link.
private void button4_Click(object sender, EventArgs e) { List<IWebElement> Element = Browser.FindElements(By.CssSelector("#tabnews_newsc a")).ToList(); for (int i = 0; i < Element.Count; i++ ) { String s = Element[i].Text; if (s.Contains("программа на C#")) // если текст СОДЕРЖИТ { Element[i].Click(); // КЛИК по новости, которая СОДЕРЖИТ искомый текст break; } } } Question:
How to make a search be performed case insensitive to search text?
Those. if the text contains "C # program", then the transition is carried out, and if the text contains "C # program" (the word "Program" with a capital "P"), then the link does not occur.