1
我正在使用White編寫一些基於UIAutomation
庫的文章C#
,我想知道如何獲得元素的實際值?我的意思是textbox
,label
button
和numeric up-down
的數值? AFAIK也沒有像'GetValue'
這樣的方法。如何實現這一目標?從UI元素獲取價值
我正在使用White編寫一些基於UIAutomation
庫的文章C#
,我想知道如何獲得元素的實際值?我的意思是textbox
,label
button
和numeric up-down
的數值? AFAIK也沒有像'GetValue'
這樣的方法。如何實現這一目標?從UI元素獲取價值
。文本
Button.Text
Label.Text
Textbox.Text
等等等等
//for textbox
string your_needed_text1 = textBox1.text;
//for button
string your_needed_text2 = Button1.text;
如果您正在使用WPF這種資源可以幫助:http://www.codeproject.com/Articles/34038/UI-Automation-Framework - 使用-WPF –