2013-07-25 122 views
1

我正在使用White編寫一些基於UIAutomation庫的文章C#,我想知道如何獲得元素的實際值?我的意思是textbox,labelbuttonnumeric up-down的數值? AFAIK也沒有像'GetValue'這樣的方法。如何實現這一目標?從UI元素獲取價值

+0

如果您正在使用WPF這種資源可以幫助:http://www.codeproject.com/Articles/34038/UI-Automation-Framework - 使用-WPF –

回答

0

。文本

Button.Text 
Label.Text 
Textbox.Text 

等等等等

0
//for textbox 
string your_needed_text1 = textBox1.text; 
//for button 
    string your_needed_text2 = Button1.text;