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.
我尝试在 Ranorex 中测试 UI。我想检查主页上的所有文字都是英文的。
但我不知道。我们如何知道一个单词是否是英语?通过 Google api 或 .NET
您可以使用正则表达式检查它,即^[a-zA-Z0-9 ]*$通过以下方式:
^[a-zA-Z0-9 ]*$
if( Regex.IsMatch("yourWord", "^[a-zA-Z0-9]*$") ) { ///Put the code here when word is english }