简体   繁体   English

在 UFT 中使用 SetTOProperty 设置对象属性

[英]Setting object property using SetTOProperty in UFT

Need to set a property of an object at runtime.需要在运行时设置对象的属性。 However the property values require certain regular expression.然而,属性值需要特定的正则表达式。 For example -例如 -

Browser("IE").Page("newpage").WebElement("First").Settoproperty "innertext", "over.*"

It seems this is not possible except setting it through OR.除了通过 OR 设置之外,这似乎是不可能的。 Any ideas ?有任何想法吗 ?

You are correct, SetTOProperty does not support regular expressions.你是对的, SetTOProperty不支持正则表达式。 If you want to use regular expressions you should use Descriptive Programming which uses regular expressions by default (although they can be turned off ).如果你想使用正则表达式,你应该使用默认使用正则表达式的描述性编程(尽管它们可以被关闭)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM