【问题标题】:Getting value from UI Element从 UI 元素中获取价值
【发布时间】:2013-07-24 21:55:52
【问题描述】:

我正在使用 White 在 C# 中基于 UIAutomation 库编写一些东西,我想知道如何获得元素的实际值?我的意思是来自textbox 的文本、来自buttonlabel 和来自numeric up-down 的数值? AFAIK 也没有像'GetValue' 这样的方法。如何做到这一点?

【问题讨论】:

标签: c# .net automation ui-automation white-framework


【解决方案1】:
//for textbox
string your_needed_text1 = textBox1.text;
//for button
    string your_needed_text2 = Button1.text;

【讨论】:

    【解决方案2】:

    .文本

    Button.Text 
    Label.Text
    Textbox.Text
    

    等等等等

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-12
      • 1970-01-01
      • 2014-08-24
      • 2011-02-25
      • 1970-01-01
      • 2017-09-08
      相关资源
      最近更新 更多