Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在页面上有一个跨度,上面写着“第 1 项 bla-bla-bla 的详细信息”。此代码工作正常:
IE.Span(Find.ByText(new Regex("Details for item 1"))).Click();
但是这个(大写的'I') - 找不到元素:
IE.Span(Find.ByText(new Regex("Details for Item 1"))).Click();
为什么?我错过了什么?
添加(?i)使其不区分大小写
(?i)
new Regex("(?i)Details for Item 1 bla-bla-bla")