开发者

automationelement write

Im working on a test to test a desktop application. Im using automation elements, from the API of microsoft. I want to write on textboxs. How can I write in a textbox that i get with an automationelement?

Im trying to make a test that navegate through an application, but i want to write in the textboxs that there are.

I already have the automation element of the textbox, but i dont know how to write.

What i can do it?开发者_JAVA技巧 And how it will be for clicking on buttons?

Thanks


Late, but maybe anyone need it in future:

To edit a value of an AutomationElement u have to call:

ValuePattern editValue = (ValuePattern)myAutomationElement.GetCurrentPattern(ValuePattern.Pattern);

after that, u can edit with:

editValue.SetValue("Add ur value HERE");

Greetz Kooki

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜