在已知控件名称,无法得知控件类型的情况下使用
Object control;
str txt;
control = element.design().controlName('FieldName') ;
if (SysTest::hasMethod(control, identifierStr(text)))
{
txt= control.text();
}
else if (SysTest::hasMethod(control, identifierStr(value)))
{
txt= control.value();
}