如何将字符串参数转换为UITestControl对象引用? [英] How to typecast a string parameter to UITestControl object reference?

查看:131
本文介绍了如何将字符串参数转换为UITestControl对象引用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有类型将字符串转换为UITestControl的对象引用?

Is there anyway to type cast a string to an object reference of UITestControl?

我想要实现的是:-

UITestControl utc =(UITestControl)(this.ParentWindow.SubWindow.Subchild);其中"this.ParentWindow.SubWindow.Subchild"作为字符串传递..

UITestControl utc=(UITestControl)(this.ParentWindow.SubWindow.Subchild); where "this.ParentWindow.SubWindow.Subchild" is passed as a string..

推荐答案

否.您不能直接将字符串分配给UITestControl.

No. You cannot directly assign a string to UITestControl.

您是否要向UITestControl的Sub-Windows添加标题?如果是,则可以将字符串添加到UITestControl的WindowTitles集合中.

Are you trying to add a title to Sub-Windows of UITestControl? If yes, then you can add the string to UITestControl's WindowTitles collection.

我希望这会有所帮助.


这篇关于如何将字符串参数转换为UITestControl对象引用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆