WatiN cannot find regex element

I have a space on the page with the text "Details for item 1 bla-bla-bla". This code works fine:

IE.Span(Find.ByText(new Regex("Details for item 1"))).Click(); 

But this (β€œI” in uppercase) - the element was not found:

 IE.Span(Find.ByText(new Regex("Details for item 1"))).Click(); 

Why? Did I miss something?

+4
source share
1 answer

add (?i) to make case insensitive

 new Regex("(?i)Details for Item 1 bla-bla-bla") 
+4
source

Source: https://habr.com/ru/post/1435008/


All Articles